On Tue, Aug 01, 2006 at 04:57:48AM +0900, Logan Capaldo wrote:
> 
> All these examples are lexical scoping. Ruby doesn't really have  
> dynamic scoping although you can sort of abuse instance variables to  
> achieve similar effects.
> 
> The difference is that blocks are closures, where def, class, and  
> module aren't.

Wait . . . you mean that *all blocks* are automagically lexical
closures, as though declared lexical variables within them have gone out
of scope?  I imagine I'm probably misunderstanding you, but if not,
that's a pretty nifty bit of trickery.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
Ben Franklin: "As we enjoy great Advantages from the Inventions of
others we should be glad of an Opportunity to serve others by any
Invention of ours, and this we should do freely and generously."