Hi Andrew,
First, change your .eqls? method to .eql? and that will fix your code.
Also, you should look into the Comparable mix-in module. Basically,
if you define the spaceship operator (<=>) and include Comparable in
your class, it will define it will define all the relational operators
(==, <, <=, >, >=) and between? for you. Plus, != is internally
implemented as the boolean negation of ==, so you get that also.
For Set member equality, two methods are used -- eql? and hash.
Eric
====
On-site, hands-on Ruby training is available from
http://LearnRuby.com
!