Ruby 1.9: What to Expect

OSCON 2008

block variables now shadow local variables


ruby 1.9

irb(main):001:0> i=0; [1,2,3].each {|i|}; i
=> 0
irb(main):002:0> i=0; for i in [1,2,3]; end; i
=> 3

ruby 1.8.6

irb(main):001:0> i=0; [1,2,3].each {|i|}; i
=> 3