Fixed broken ranking in Ruby 1.8.7