On Dec 29, 2011, at 21:25 , Josh Cheek wrote:

> On Thu, Dec 29, 2011 at 5:47 PM, Nikolai Weibull <now / bitwi.se> wrote:
>=20
>>=20
>> I seem to have failed in communicating what I=92m after.  I wasn=92t =
after
>> different ways of implementing #hash, I was after the golden standard
>> of #hash implementations for value objects.  So, again, what=92s the
>> standard way of implementing #hash for value objects in Ruby?
>>=20
>> If there isn=92t one, perhaps one should be agreed upon?
>>=20
>>=20
> If there is one, I don't know what it is, which implies there isn't =
one.
>=20
> I usually just delegate to one of my attributes' hash methods (e.g. =
for a
> user, I might use its user's name's hash). I'm not sure what advantage
> would be gained by establishing a standard.

You should be doing the same attributes you use in an equality test. I =
usually throw all the attributes in an array and ask for it's hash.