From: Yukihiro Matsumoto Date: 2008-09-29T21:42:09+09:00 Subject: Re: ruby1.9 block scope Hi, In message "Re: ruby1.9 block scope" on Mon, 29 Sep 2008 21:24:02 +0900, Daniel DeLorme writes: |> | >> 1.times{ x=2 } |> |=> 1 |> | >> x |> |NameError: undefined local variable or method `x' for main:Object |> I have once presented a plan to make it work so, but have never |> implemented. So it's not "changed reversed". Just the idea |> abandoned. | |Ah, ok, then I guess I *did* dream the whole thing. For the record, I |think it's a great idea and deserves to be implemented... in ruby 2.0 |maybe ;-) My vague idea for the issue is that when you see the reference to a local variable inside of the block, the scope of the variable would be upgraded to the level of the reference. matz.