From: gwtmp01@... Date: 2006-02-10T04:54:21+09:00 Subject: Re: Method Definitions: &block vs. yield() On Feb 6, 2006, at 6:03 PM, Joel VanderWerf wrote: > But with yield, you can only call the block from within the scope > of the method. If you need to store it away somewhere and call it > after returning, then you have to use a Proc. You can pass an implicit block to another method by wrapping it in another block: class Example def m1 m2 { yield } end def m2 yield end end e1 = Example.new e1.m1 { p 42 } There is no explicit reification of a block to a Proc object in this example. This technique can avoid the creation of a Proc object in many common situations, but certainly not in all cases. Gary Wright