lib/mongo_mapper/plugins/equality.rb in mongo_mapper-unstable-2010.3.8 vs lib/mongo_mapper/plugins/equality.rb in mongo_mapper-unstable-2010.06.23

- old
+ new

@@ -1,20 +1,14 @@ +# encoding: UTF-8 module MongoMapper module Plugins module Equality module InstanceMethods - def ==(other) + def eql?(other) other.is_a?(self.class) && _id == other._id end - - def eql?(other) - self == other - end - - def equal?(other) - object_id === other.object_id - end - + alias :== :eql? + def hash _id.hash end end end \ No newline at end of file