Attached is a patch that will fix the issue. This bug was caused
by a
change in the way ruby 1.9 scopes local variables within
blocks.
Essentially, locally defined variables within a block's argument
list will shadow existing locally scoped variables in ruby 1.9, but
not in ruby 1.8.
For instance, consider the following code:
a = nil
[1,2,3].each {|a| print "#{a} "} puts a.inspect
In ruby 1.9, this outputs:
1 2 3 nil
Whereas ruby 1.8 outputs:
1 2 3 3
I tested the patch in 1.8 and 1.9 and it seems to work.