From: Albert Wagner Date: 2001-07-10T10:47:28+09:00 Subject: [ruby-talk:17577] Re: Constants and Variables On Monday 09 July 2001 11:40, you wrote: > One of the other things I miss dearly is a way to create a new > block-local variable. I have been bitten by > > foo = 42 > bar.each { |foo| foo.doSomething(); } > ...foo is no longer 42 > > which would have been avoided by defining the second foo as block > local -- by the way, it is a formal parameter for the block, why > does it even think about touching the foo from outside the block? > This looks so wrong to me. > > Me too. But for some reason I have yet to fathom, no one else here agrees.