--Mjqg7Yu+0hL22rav
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello, ruby-talk.

What the best (fast, yet with relatively few cases when equal hashes
are generated for non-eql objects) way to implement a hash method?

Is XOR-ing the hashes of an object instance variables (assuming that
two objects are eql if their ivars are eql) a good general approach?

I asking because I use this pattern in my code, and it seems quite
fast; I needed to work around a bug in MRI Set#hash and this solution¹
seems about as fast as the original MRI Set#hash. I just not sure
whether it hashy enough (so to speak) in that two un-eql objects
hashed in this way produce different hashes often enough.

¹ http://github.com/Chastell/art-decomp/commit/b465660b9dcc8eada86f50bbcb8f951aa8145a19

Shot
-- 
Ill-informed qmail-bashing is better than
no qmail-bashing at all.      [Don Marti]

--Mjqg7Yu+0hL22rav
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkqpIZoACgkQi/mCfdEo8UpDpQCeP3ttOJXQLioMVXL0GSFlJBKU
e24AoJmbRhF+IRLg9sah1otjWw3rV+3/
k5
-----END PGP SIGNATURE-----

--Mjqg7Yu+0hL22rav--