On Tue, Feb 11, 2014 at 12:07 PM, F=F6ldes L=E1szl=F3 <lists / ruby-forum.com=
> wrote:
>> You can do this:
>>
>> $ ruby -e 'x=3D666;p x;2.times {|i,x=3D8| p [i,x];x=3Di}; p x'
>> 666
>> [0, 8]
>> [1, 8]
>> 666
>
> Whoa, so the enumerator resets the variables to the defined value every
> iteration? I didn't know that (as I never used them).

That is common behavior for programming languages once a scope is
entered: every time the variable is reinitialized (even if it is just
nil that's used).

Cheers

robert

--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/