Alexandru Popescu wrote:
 > While to anybody else this code made things clear, for me it is still
 > a little bit confusing:
 >
 > why outer12 is performing slower than outer22?
 >
 > According to prev posts, I have understood that the usage of
 > block.call requires a conversion to a Proc and this is slower. But in
 > above case where is this conversion taking place? (or simply, why is
 > it slower?).

 >> def outer12(&bl)
 >>   inner2(&bl)
 >> end

The conversion from block to a Proc object happens because of the &bl in 
the above definition. When outer12 is actually called, the Proc is 
instantiated and the variable bl is bound to it.

 >> def outer22
 >>   inner2 {yield}
 >> end

No & here, so no Proc is created.

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407