Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: how do I convince Hash that two keys are the same?: msg#00059

Subject: Re: how do I convince Hash that two keys are the same?
On Tuesday, March 15, 2005, 10:14:18 AM, James wrote:

> Gavin Sinclair wrote:
>> ...
>> I think it's valuable and would like someone to commit it, once an
>> example has been found.  I think a good example is
>> 
>>   class Details
>>     attr_accessor :name, :age
>>     def ==(other)
>>       @name = other.name and @age = other.age

>          @name == other.name and @age == other.age
> ---------------^_____________________^


> No?

Oops...

Gavin






<Prev in Thread] Current Thread [Next in Thread>