From: Tom Sawyer Date: 2003-02-15T04:41:52+09:00 Subject: Re: Lexical scope and closures On Friday 14 February 2003 08:18 am, nobu.nokada@softhome.net wrote: > > ? Why would you then need a 'local' keyword at all? > > def local; yield; end all it does local a and b. ugly, if you ask me. hey, i thought of another ugly possibility yesterday! :-) arr.each { |i| c = "is local" @c = "is c in outer scope" @@c = "is @c in outerscope" @@@c = "is @@c in outerscope" } yep, and then you can layers and layers of blocks and eventually end up with: @@@@@@@@@@@@@@@c = "foo bar" fun fun ;-) -- tom sawyer, aka transami transami@transami.net