Ruby magic

gmarik 1 min

Ruby magic:

ruby <<-EOR
puts (not(false
1))
EOR

what would above yield?

I’m not sure but i think that newline here acts as statement separator, so last statement’s value gets negated and false yielded. Tricky

Read More
Native Irb experience on OSX
Vim scripts github mirror
Comments
read or add one↓