OK guys, wtf am I doing wrong here?
The manual says I should be able to do this.

=======================

irb(main):150:0> { puts 'foo' }
SyntaxError: compile error
(irb):150: syntax error, unexpected tSTRING_BEG, expecting kDO or '{' or
'('
{ puts 'foo' }
        ^
(irb):150: syntax error, unexpected '}', expecting $end
  from (irb):150
  from :0
irb(main):151:0> { puts('foo') }
SyntaxError: compile error
(irb):151: odd number list for Hash
  from (irb):151
  from :0
irb(main):158:0> do puts 'foo' end
SyntaxError: compile error
(irb):158: syntax error, unexpected kDO
do puts 'foo' end
  ^
(irb):158: syntax error, unexpected kEND, expecting $end
  from (irb):158
  from :0
irb(main):160:0> do; puts 'foo'; end
SyntaxError: compile error
(irb):160: syntax error, unexpected kDO
do; puts 'foo'; end
  ^
(irb):160: syntax error, unexpected kEND, expecting $end
  from (irb):160
  from :0

-- 
Posted via http://www.ruby-forum.com/.