James Edward Gray II wrote:
> On Jul 9, 2007, at 8:29 AM, John Joyce wrote:
>> There is always (usually) a way to wrap something in a method. You can 
>> always make something def
> 
> I believe this is one of the exceptions.  That's exactly why it is a 
> keyword.
> 
> Give it a shot.

Yes, I should have been more clear.

yield is a keyword whose function depends on having access to the 
current call frame. Since any method you might define and call would 
execute in a new call frame, there's no way to provide a method that 
does what yield does. This is why if you ever want to pass a given block 
to another method, you must capture it in a block argument, and also why 
yielding to a block is much faster than calling a proc (since there's 
less overhead in yielding than in calling a free-standing proc).

- Charlie