From: Ryan Davis Date: 2010-03-02T17:00:41+09:00 Subject: Re: Here's a filtered file/dir copy, FWIW. On Mar 1, 2010, at 16:32 , Nick Sabalausky wrote: > That "do |value|...end" is *not* a full function literal like I was > expecting it to be, but some kind of...like a closure of a portion of > the function it's contained in. More like using cross-function goto's > than calling a passed-in function. That is exactly what a block is... a closure. > So the cp_rx function I posted *does* work right, it was just that the > filter I was passing in to it was malformed and returning from the top > few entires in the call stack instead of just the top one. exactly. The proper way to write your reproduction is not: > callWith123 do |value| > if value == 2 then > return false > end > true > end but: > callWith123 do |value| > value != 2 > end And again, you need to ACTUALLY write tests. /soapbox