From: Charles Oliver Nutter Date: 2007-12-23T07:11:24+09:00 Subject: Re: Block-local variables - obsolete? Only block parameters are now always local to the block; variables from enclosing scopes are still visible. The ; syntax, then, is to specify certain names should be forced local, rather than defering to the outer scope. - Charlie On Dec 22, 2007, at 15:39, murphy wrote: > hello! > > excuse me, but what was the purpose of the "|vars; local|" block > syntax > again? > > as I understand it, block variables in Ruby 1.9 are now always local: > > foo = bar = :outer > > [foo, bar] # => [:outer, :outer] > > 1.times do |foo; bar| > [foo, bar] # => [0, nil] > foo = bar = :inner > end > > [foo, bar] # => [:outer, :outer] > > making the ";"-syntax obsolete (it can be replaced with "," without > changing the behavior of the code.) > > [murphy] >