Fix scoping problem in Ruby 1.9.2