module ActiveRecord::Core

def hash

[ Person.find(1), Person.find(2), Person.find(3) ] & [ Person.find(1), Person.find(4) ] # => [ Person.find(1) ]
Delegates to id in order to allow two records of the same type and id to work with something like:
def hash
  id = self.id
  if id
    self.class.hash ^ id.hash
  else
    super
  end
end