On Wed, 2 Aug 2006, Chad Perrin wrote:
> That still doesn't make all blocks closures, though.
really?
harp:~ > cat a.rb
class Object
def closure(&block) block end
end
p(eval('self', closure))
class C
p(eval('self', closure))
end
harp:~ > ruby a.rb
main
C
any block encloses, at minimum, 'self'. therefore all blocks are closures.
-a
--
we can never obtain peace in the outer world until we make peace with
ourselves.
- h.h. the 14th dali lama