C
Chris Pine
I have been getting complaints that the code in my tutorial generates
warnings (just in chapter 5). So, I'm looking into it, and I notice the
following:
irb(main):001:0> puts 'hello '.+ 'world'
(irb):1: warning: parenthesize argument(s) for future version
hello world
=> nil
irb(main):002:0> puts 'hello ' + 'world'
hello world
=> nil
So why the warning? It's a shame, because the code won't be nearly as
readable for newcomers to Ruby, littered as it will have to be with
parenthases.
Also, can we stop switching from "syntax error" to "parse error" and back?
Chris
PS: I tried sending this to the ML instead of the newsgroup, and nothing
happened. Not even a message telling me "no, thank you, chris". What's up?
warnings (just in chapter 5). So, I'm looking into it, and I notice the
following:
irb(main):001:0> puts 'hello '.+ 'world'
(irb):1: warning: parenthesize argument(s) for future version
hello world
=> nil
irb(main):002:0> puts 'hello ' + 'world'
hello world
=> nil
So why the warning? It's a shame, because the code won't be nearly as
readable for newcomers to Ruby, littered as it will have to be with
parenthases.
Also, can we stop switching from "syntax error" to "parse error" and back?
Chris
PS: I tried sending this to the ML instead of the newsgroup, and nothing
happened. Not even a message telling me "no, thank you, chris". What's up?