Daniel Finnie
1/10/2007 12:36:00 AM
dblack@wobblini.net wrote:
>I'm not sure how Daniel's example relates to the yield/call matter.
It's kind of a null issue now, IMO, now that the method of passing
blocks is cleared up, but this is what I meant:
$_ = "hello"
scan(/l/)
This example has a receiver that is not explicit (not in the sense that
the receiver is self but that it is not on that line). This method is
falling out of favor for the above reason.
def meth
yield
end
This example also has a yield with no explicit receiver as defined
above. If the above example is going out of favor, why is this one the
preferred method?
> Also, Jeremy, I thought what you were talking about was this:
>
> def meth
> yield
> end
>
> vs.
>
> def meth(&block)
> block.call
> end
>
This is what I was referring to as well, if it isn't obvious from my
other replies I'm sorry.
> David
Dan
>