From: dblack@... Date: 2007-02-04T22:25:47+09:00 Subject: Re: Proc vs lambda vs proc Hi -- On Sun, 4 Feb 2007, Robert Klemme wrote: > On 04.02.2007 12:28, Kalman Noel wrote: >> Robert Klemme: >>> On 04.02.2007 04:55, Minkoo Seo wrote: >>>> I got a question on Proc.new and lambda { ... }. AFAIK, there's two >>>> differences between Proc.new(=proc) and lambda. >>> I think you have it slightly wrong: "proc" and "lambda" are aliases while >>> "Proc.new" works different. >> >> This is true for Ruby 1.8, but was changed in Ruby 1.9. The decision was >> taken because proc and Proc.new are lexically too similar to have different >> meanings, IIRC. > > Thanks for the heads up! Me not being an early adopter tested with 1.8 only. > At least I don't have to change my habit of using "lambda". :-) Originally, I think the decision was to deprecate 'proc' entirely -- which would be fine with me, though as long as it's not different from Proc.new that's OK too. David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)