B
botp
I know Perl, but I'm still surprised.
# perl -le 'print undef or 4'
# perl -le 'print(undef or 4)'
4
do not be surprise, ruby opted for the former case since it is more
common, and therefore has relegated the "or/and" ops w very low
precedence level (and ergo different fr their sibling ops "||/&&")
in other words, if you see a method like
1
2
=> 4
it actually means
1
2
=> 4
and if you write a statement like
ruby will err for you
but friendly enough to allow you to by (re)emphasizing...
so maybe you meant
best regards
-botp