"ts" <decoux / moulon.inra.fr> wrote in message
news:200210060619.g966JZL25770 / moulon.inra.fr...
> #!./ruby
> def a(b := 'ff')
>    b, i := 12, 24
>    [1, 2].each do |i|
>       b = i;  b *= 2; p b
>       b := i; b *= 4; p b
>    end
>    p b, i
> end

I have not been following this thread, so I'm sorry if I got it wrong.

:= assigns to local block scope, = assigns to outside the local block scope.

What happens with nested scopes.
I can see that := deals with the inner block scope, but = assignement
becomes a bit vague.

I know Ruby isn't big on declarations, but what if you declared local
variables and just used normal assignment:

attr_local :b # or just "local b"
b = 2

Thus there is always exactly one meaning of a variable and you get problems
when changing code from being a function to a block you just have to add the
local declaration in one place.

Mikkel