K
Kristof Bastiaensen
Hi,
I get a syntax error when I try to use "or" inside a argument
list:
#doesn't work:
puts(nil or "string")
String.new(nil or "string")
#the following works:
puts (nil or "string")
String.new((nil or "string"))
It appears that Ruby accepts the "or" when it parses it as an
expression, but not when it parses it as an argument list.
Isn't any expression valid inside an argument list?
$ ruby --version
ruby 1.8.2 (2004-07-16) [i386-linux]
Regards,
KB
I get a syntax error when I try to use "or" inside a argument
list:
#doesn't work:
puts(nil or "string")
String.new(nil or "string")
#the following works:
puts (nil or "string")
String.new((nil or "string"))
It appears that Ruby accepts the "or" when it parses it as an
expression, but not when it parses it as an argument list.
Isn't any expression valid inside an argument list?
$ ruby --version
ruby 1.8.2 (2004-07-16) [i386-linux]
Regards,
KB