From: Charlton Wang Date: 2008-12-08T00:11:40+09:00 Subject: Re: Ruby 1.8.7 Lambas: syntax and scoping issue (are these b The Higgs bozo wrote: > Charlton Wang wrote: >> >> # fails syntax error >> foo :parm1=>1, :parm2=>lambda { puts "lambda" } do >> puts "In bar block" >> end > > Curiously, that works in 1.9. > > I also noticed this succeeds in 1.8 (and 1.9): > > foo :parm1=>1, :parm2=>lambda { puts("lambda") } do > puts "In bar block" > end That's really interesting. So the parentheses as arguments to the puts make it work. How odd! -- Posted via http://www.ruby-forum.com/.