I have a simple program:
def hello2 name2
puts 'Hello ' + name2
return 'success'
end
puts(hello2 'Ruby')
When I run this in 1.8.6, I get the output as:
tmp2.rb:5: warning: parenthesize argument(s) for future version
Hello Ruby
success
However, when I run the same in the development version 1.9, I get the
output as:
Hello Ruby
success
My question is:
a. Has the warning being removed in 1.9 ?
b. What happened to parenthesize argument(s) from 1.9?
Hi,
My question is:
a. Has the warning being removed in 1.9 ?
Yes. I added the warning for ease of future reimplementation of
the parser, but the plan was canceled. In addition, somebody (forgot
his name, sorry) persuaded me that the unparenthesized arguments are
useful to implement DSL in Ruby.
b. What happened to parenthesize argument(s) from 1.9?
Just works fine, without warning.
matz.
···
In message "Re: Ruby 1.9 Warning not there?" on Fri, 11 Jan 2008 14:54:35 +0900, "Satish Talim" <satish.talim@gmail.com> writes: