From: Daniel Brockman Date: 2005-06-29T02:30:05+09:00 Subject: Re: yield does not take a block Yukihiro Matsumoto writes: > yield is a keyword to pass a value (and control) to the block > attached to the method. I feel strange when I see yield passes a > block to an outer block. I feel strange when I see these are not equivalent: def foo1 &block block.call &bar end def foo2 Proc.new.call &bar end def foo3 &block yield &bar end The middle one may be a weird idiom that should be phased out, but I really think that calling a block captured into a variable should be equivalent to using yield. If foo1 and foo3 are not equivalent, then we have an inconsistency. -- Daniel Brockman