From: Charles Oliver Nutter Date: 2007-01-10T09:25:09+09:00 Subject: Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks Yukihiro Matsumoto wrote: > Hi, > > In message "Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks" > on Tue, 9 Jan 2007 17:42:25 +0900, Charles Oliver Nutter writes: > > |Evan and I do not see eye-to-eye on this, but we agree on many other points: > | > |- no way to explicitly scope variables is confusing > |- bugs arise from missing explicit scoping > > For your information, Ruby2 has explicit scoping in blocks. > > lambda {|a,b; v1, v2| ...} > > Variables a, b (parameters), v1 and v2 are local to the lambda block. And otherwise 1.9 still uses the 1.8 lexical scoping semantics, yes? -- Charles Oliver Nutter, JRuby Core Developer Blogging on Ruby and Java @ headius.blogspot.com Help spec out Ruby today! @ www.headius.com/rubyspec headius@headius.com -- charles.nutter@sun.com