Hi,

Dave Thomas writes:
> 
> Is there a difference between
> 
>   def fred
>     yield 1
>     yield 2
>   end
> 
> and
> 
>   def fred(&block)
>     block.call(1)
>     block.call(2)
>   end
> 
> 

AFAIK --if I have understood matz right-- there is only a performance
penalty by using your second example. That is, as a block has to
converted into a Proc instance *and*then* passed over to the method. A
further penalty has to be added for every call, as yield'ing a block
is faster than call'ing a Proc instance!

> Curious of Dallas...
> 

BTW: Best wishes for 2000 to all of the Ruby community and you
families & friends & ... :-)))

\cle

-- 
Clemens Hintze  mailto: c.hintze / gmx.net