From: Joel VanderWerf Date: 2008-05-21T12:28:58+09:00 Subject: Re: is there a better way to write { yield } 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