From: Logan Capaldo Date: 2006-08-02T05:29:40+09:00 Subject: Re: I thought this was the one that worked? On Aug 1, 2006, at 4:20 PM, Chad Perrin wrote: > On Wed, Aug 02, 2006 at 05:12:02AM +0900, ara.t.howard@noaa.gov wrote: >> On Wed, 2 Aug 2006, Chad Perrin wrote: >>> >>> Wait . . . are you serious? Ruby is using dynamic scope here? Ugh. >> >> no. >> >> def x >> puts a >> end >> >> is __lexical__ scoping. not dynamic. > > It's not lexical scoping if that "a" variable is separate from the "a" > variable in the enclosing scope. > Ah this is where you misunderstand. def does not close over a. defs introduce a new "toplevel" scope. > -- > CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] > "Real ugliness is not harsh-looking syntax, but having to > build programs out of the wrong concepts." - Paul Graham >