From: noreply@... Date: 2007-01-26T23:50:09+09:00 Subject: [ ruby-Bugs-8174 ] Strange behaviour of iterator variable inside eval Bugs item #8174, was opened at 2007-01-26 14:50 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=8174&group_id=426 Category: Core Group: 1.8.5 Status: Open Resolution: None Priority: 3 Submitted By: Robin Houston (rekso) Assigned to: Nobody (None) Summary: Strange behaviour of iterator variable inside eval Initial Comment: This does what I would expect: [robin robin]$ ruby -e '[1].each_index{|i| eval "puts i"}' 0 However, if I assign to i after the puts, i is equal to true rather than to 0: [robin robin]$ ruby -e '[1].each_index{|i| eval "puts i; i=1"}' true I'm running the 2006-12-25 build: [robin robin]$ ruby -v ruby 1.8.5 (2006-12-25 patchlevel 12) [powerpc-darwin8.8.0] I'm told that the code above works as expected in the 2006-08-25 release, so this looks like a regression. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=8174&group_id=426