From: Brian Candler Date: 2009-03-06T20:20:59+09:00 Subject: Re: What's wrong with lambda and class Actually, the question for me was "why 1?" in your second case. Passing a lambda as a block argument to a method is an odd thing to do; I believe it is being coerced to a block as if you did Proc.new(&c). Maybe this makes it clearer: def call_block(&c) c.call end def lambda_and_call c = lambda { return 1 } call_block(&c) + 1 # the lambda returns 1 end p lambda_and_call def yield_block(&c) yield end def lambda_and_yield c = lambda { return 1 } x = yield_block(&c) # the entire method returns 1 STDERR.puts "This line is not reached!" x + 1 end p lambda_and_yield -- Posted via http://www.ruby-forum.com/.