From: "David A. Black" Date: 2004-07-08T03:56:03+09:00 Subject: Re: Class#=== has interesting results Hi -- On Thu, 8 Jul 2004, Charles Comstock wrote: > 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? At the point where you call it :-) It can't do both; there would be no way to interpret the result: case s when String ... # what do you do here? print it? instantiate it? David -- David A. Black dblack@wobblini.net