Call super in BSON::OrderedHash#== instead of doing the comparison in Ruby.

This has a notable performance impact for large hashes.
This commit is contained in:
Jari Bakken 2010-09-28 18:57:42 +02:00 committed by Kyle Banker
parent b3ed1486e5
commit 9d2f3fbc27

View File

@ -30,7 +30,7 @@ module BSON
when BSON::OrderedHash
keys == other.keys && values == other.values
else
!other.nil? && keys.size == other.keys.size && keys.all? {|x| self[x] == other[x] }
super
end
rescue
false