From: Dave B Date: 2009-03-04T06:42:40+09:00 Subject: [ruby-core:22657] [Bug #1240] parser bug in 1.8.7 and 1.9.1p0 Issue #1240 has been updated by Dave B. As there's no context for this "bug", I've tried to provide some. The parser takes different routes depending on what has been seen, so context is important. def x(args=nil) p [:x_args, args] block_given? and (puts '--> x blk'; yield) end def y(args=nil) p [:y_args, args] block_given? and (puts '--> y blk'; yield) end class String def z(args=nil) p [:z_args, args] block_given? and (puts '--> z blk'; yield) end end x y { "#{}".z { "GIGO\n".display } } # x y { "#{}".z do "GIGO\n".display end } # parser fail # Contrasting with ... p "#{}".z { "GIGO\n".display } puts '---' p "#{}".z do "GIGO\n".display end # ... what was "do end" in the original report # expected to bind to? daz ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1240 ---------------------------------------- http://redmine.ruby-lang.org