From: Yukihiro Matsumoto Date: 2007-01-27T17:15:37+09:00 Subject: Re: [ ruby-Bugs-8174 ] Strange behaviour of iterator variable inside eval Hi, In message "Re: [ ruby-Bugs-8174 ] Strange behaviour of iterator variable inside eval" on Fri, 26 Jan 2007 23:50:09 +0900, writes: |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. It surely is a bug. I will fix it very soon. matz.