From: Mischa Fierer Date: 2008-09-11T17:18:03+09:00 Subject: Re: Blocks and scoping question A friend informs me that this is changed in 1.9 For this who are interested: http://groups.google.com/group/sbonrails/browse_thread/thread/cfcfdad71d8f786c Mischa Fierer wrote: > Hello, > > The following makes sense to me: > > lambda {|x| puts x; [1,2].collect{|x| x+1} }.call("aaa") > aaa > => [2, 3] > > The following does not so much: > > lambda {|x| puts x; [1,2].collect{|x| x+1}; puts x }.call("aaa") > aaa > 2 > => nil > > Why is the final puts x not return a? -- Posted via http://www.ruby-forum.com/.