Hi -- On Tue, 6 May 2008, Paul Brannan wrote: > On Tue, May 06, 2008 at 02:07:26AM +0900, ts wrote: >> This is just me which associate, probably wrongly, lambda and >> define_method and 1.9 seems have method argument semantics with >> lambda > > Hmm, you seem (as usual) to be correct. What, then, is the purpose of > the -> syntax, if these are equivalent: > > p = lambda { |x, y, &b| ... } > p = ->(x, y, &b) { ... } > > (or am I mistaken in thinking they are equivalent?) > > If they are the same, then I'm content to just not use -> in my own > code. See my response to Guy. ->() lets you do method-argument semantics: ->(a,b=1) {} whereas this blows up: lambda {|a,b=1| } David -- Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin INTRO TO RAILS June 24-27 London (Skills Matter) See http://www.rubypal.com for details and updates!