From: Mike Austin Date: 2006-03-23T16:53:51+09:00 Subject: Re: what on earth.. Timothy Bennett wrote: > Ok, this is off the original track of discussion a bit, but I wanted to > bring this up. > > irb(main):007:0> 5 === Fixnum > => false > irb(main):008:0> Fixnum === 5 > => true > > irb(main):001:0> 5.class === Class > => false > irb(main):002:0> Class === 5.class > => true So that was what got me a few weeks ago when using a case statement! I was like 'what the ?? is happening' It seems the === operator is an good example of bad overloading - it means something different to each class. Why not let "abc" === "ABC" while we're at it ;) Mike > I understand why this is happening (I think). I just think this needs > to be fixed. Or is there a reason why === should not be commutative? > > Tim