> You can do this:
>
> $ ruby -e 'x=666;p x;2.times {|i,x=8| p [i,x];x=i}; 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).

-- 
Posted via http://www.ruby-forum.com/.