From: Gareth Adams Date: 2006-08-09T21:05:08+09:00 Subject: Re: For Float#class why is '===' different from '==' richB yahoo.com> writes: > Why does '==' match, and '===' does not. I am trying to use a case > statement on the class and it doesn't work because '===' is not giving > the newbie expected result. As others have said, === is a function call case a when Float # Float === a when 2005 # 2005 === a 2005 is a FixNum, and FixNum implements === the same as == Float is a Class (as you'll see if you type Float.class), and Class implements === basically like this as far as I can tell: class Class def ===(other) other.kind_of? self end end So, the reason you're getting the result you're getting is because a === b doesn't necessarily mean b === a - it depends on the classes of a and b Gareth