From: David Smiley Date: 2006-02-28T04:48:25+09:00 Subject: Re: parser bug, function call without parens across multiple lines First of all, I'd like to apologize because my bug report was actually against Ruby 1.8.2, not 1.8.4. I should of been more thorough and had my co-worker validate that his Ruby version was what he claimed it was. I have since upgraded my ruby: ruby 1.8.4 (2005-12-24) [powerpc- darwin8.4.0] As it turns out: puts Class.new { def to_s 'no bug' end }.new Will return 'no bug', as I intuitively expect, and so will the one- liner: puts Class.new { def to_s; 'no bug'; end }.new But the do-end version: puts Class.new do def to_s 'no bug' end end.new has the same error I originally reported, and so does the one-liner version of the same: puts Class.new do def to_s; 'no bug'; end; end.new Unlike in 1.8.2, the one line versus multiline are consistent -- that is good and intuitive. Thanks, Stegan, for pointing me to the end of: http://rake.rubyforge.org/files/doc/rakefile_rdoc.html I'm not sure exactly what to think of this behavior (I have not written my own parser ... so my expectation may be unrealistic)... but it does not "feel right" to me, FWIW. ~ David Smiley