I recently found myself explaining to a friend how Ruby's various
comparison operators work. In the process, I tried to find some decent
documentation on why Ruby has so many different ways to test for
equality, how they differ and how they should be implemented and used.

I was unable to find any such documentation, so I decided to have a go
myself :-) You can see the fruits of my labours here:

http://www.texperts.com/2007/10/16/navigating-the-equality-maze/

I believe that it's an accurate reflection of both how things work and
the philosophy underlying the design of this area. I would be very
grateful if you could let me know if I have anything wrong or have left
anything out though!

There are a number of subtle pitfalls in this area waiting to trap the
unwary. I hope that this may go some way to helping a few people avoid
them :-)

Comments, criticisms and suggestions all gratefully received.

Paul.
-- 
Posted via http://www.ruby-forum.com/.