From: Charles Comstock Date: 2004-07-08T02:32:36+09:00 Subject: Re: Class#=== has interesting results Mauricio Fern�ndez wrote: > On Wed, Jul 07, 2004 at 04:22:36PM +0900, Charles Comstock wrote: > >>Why does this happen? >> >>class A >>end >> >>A == A #1 => true >>A === A #2 => false >> >>But 2 doesn't make any sense to me, why doesn't an A match another A? >>Is this just something that slipped through or is there a specific >>reason for this? > > > A is not an instance of A; see the ri info for Module#===. > At what point does it cause trouble for it to also return true if the class matches? Can someone give me an example of why it must match an instance and couldn't match the exact class? I understand it's only matching instances of the class, I just don't follow the logic behind why this is the default. Is there example code that uses this assumption? Charles Comstock