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°«m after.  I wasn°«t after
different ways of implementing #hash, I was after the golden standard
of #hash implementations for value objects.  So, again, what°«s the
standard way of implementing #hash for value objects in Ruby?

If there isn°«t one, perhaps one should be agreed upon?

One suggestion would be the XOR of the hash values of the object°«s
class and its instance variables.

Another is the XOR of the hash value of the object°«s class and the
hash value of an Array containing its instance variables.