On Fri, Dec 30, 2011 at 00:26, Robert Klemme <shortcutter / googlemail.com> wrote:
> Easy way:
I seem to have failed in communicating what I after. I wasn after
different ways of implementing #hash, I was after the golden standard
of #hash implementations for value objects. So, again, what the
standard way of implementing #hash for value objects in Ruby?
If there isn one, perhaps one should be agreed upon?
One suggestion would be the XOR of the hash values of the object
class and its instance variables.
Another is the XOR of the hash value of the object class and the
hash value of an Array containing its instance variables.