From: Logan Capaldo Date: 2006-08-02T05:07:26+09:00 Subject: Re: I thought this was the one that worked? On Aug 1, 2006, at 3:56 PM, Chad Perrin wrote: > On Tue, Aug 01, 2006 at 11:00:12PM +0900, Just Another Victim of > the Ambient Morality wrote: >> >> a = 1 >> def x >> puts a >> end >> >> def y >> x >> end >> >> >> Then x _will_ be a closure but, then again, we already knew >> this... > > If that's the case, then *everything else* is a closure too, because > everything else has access to a -- at least where lexical or global > scope exists. > Actually no one has access to a because it is a local variable. Look all blocks close over at _least_ self. If a block contains a call to any receiverless method it is a closure even by your rigid definition. > -- > CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] > print substr("Just another Perl hacker", 0, -2); >