In article <E13lRcf-00035u-00 / ev.netlab.zetabits.co.jp>,
  Yukihiro Matsumoto wrote:
>Hi,

Hi,

>In message "[ruby-talk:5627]
>    Re: local variables (nested, in-block, parameters, etc.)"
>    on 00/10/17, Clemens Hintze <cle / qiao.localnet> writes:

(...)

>Here's the simplest example:
>
>  i = nil  
>  ary.each{|i| break if condition(i)}
>  p i

Thank you for this! Now I am convinced I have never used this :-) Another
proposal ...

Could we get variable aliasing? Means (syntax not proposed)

  x = 12
  a := x    # aliasing a with x means both meaning the same variable
  a = 14
  p a,x     # a = 14 and x = 14

If we could have such, we could extend theirs usage for block parameters
also. We would write your example above like:

  i = nil
  ary.each{|x:=i| break if condition(x)}
  p i

Then block parameters could remain local to the block until explicitely
aliased with an variable from outer scope ...

(...)

>							matz.

Just another stupid idea ...

\cle

-- 
Clemens Hintze  mailto: c.hintze / gmx.net