Correction:

>   def hash
>     @email.hash ^ self.class.hash +
>   end

should be:

def hash
  @email.hash ^ self.class.hash + 1
end