From: nobu.nokada@... Date: 2003-02-15T00:18:05+09:00 Subject: Re: Lexical scope and closures Hi, At Fri, 14 Feb 2003 22:32:11 +0900, Robert Klemme wrote: > > > > I'd choose something between > > > > > > > > arr.each {|i| > > > > local{|a,b| > > > > c = .. > > > > ... > > > > } > > > > } > > (snip) > > > > in either case, a, b are local, c is method-wise variable. > > > > > > I vote for the second variant, possibly replacing 'let' with 'local'. The > > > drawback of the first variant is IMHO that it is too easily recognized as > > > an ordinary block. > > > > Because it is an ordinary block. > > ? Why would you then need a 'local' keyword at all? def local; yield; end -- Nobu Nakada