From: Manuel Kasten Date: 2005-11-11T03:17:14+09:00 Subject: Re: Question regarding <=> operator and Comparable Mixin > |then why doesn't [line10] return nil? a <=> b is nil [6], so is c <=> d [7]. > |a == b returns false [10], while c == d returns nil [11]. I expected > |both to return nil or both to return false. > > Right. Although it has its own good reason internally, it is > inconsistent. Those two lines should return same values. Let me > think about it. If you have any opinion, let me know. I'd prefer returning false. I think it's odd if I test for equality and don't recieve a boolean in return. But I'm new at Ruby so maybe nil makes sense, too (not for me, though). Manuel