Joel VanderWerf
5/21/2008 3:29:00 AM
Stephan Wehner wrote:
> Is there a better way to write something like
>
> def meth(a,b,c)
> :
> :
> other_meth(d) { yield }
> :
> :
> end
>
> That { yield } has some redundancy.
That form has the advantage, IIUC, that no Proc object is created, so
it's a little more efficient. (Search the archives for block versus
proc.) Also, Rdoc can pick up the yield (and its arg) automatically.
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407