Hi,
In message "[ruby-talk:12615] Re: Order, chaos, and change requests :)"
on 01/03/14, Leo Razoumov <see_signature / 127.0.0.1> writes:
|n = 0
|my = 1
|(1..100).each \
|{
| <my,local,vars,declared,here>
| |n|
| my += n
| # ....
|}
|n # -> 10 #side effect, 'n' was overriden within the block
|my # -> 1 #still old value, not affected by block-local var. of the same name
I like this except that I feel name duplication like the following is
little bit messy.
array.each {<i>|i|...}
matz.