From: lasitha Date: 2009-03-06T20:45:41+09:00 Subject: Re: What's wrong with lambda and class On Fri, Mar 6, 2009 at 4:50 PM, Brian Candler wrote: > 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). That's what i'm trying to figure out, too. If the lambda is being coerced, it isn't being honest about it: 01> def is_lambda?(&closure) 02> closure.lambda? 03> end 04> is_lambda? &(Proc.new { }) --> false 05> is_lambda? &(lambda { }) --> true Perhaps it has more to do with rules around yield (or it's implementation)? All i've dug up so far is this (unanswered) thread: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/22634 Been scanning the Pickaxe and Flannagan/Matz but haven't seen anything definitive on this yet. FWIW, lasitha