From: khabibiuf@... (Khurram) Date: 2002-10-30T23:37:41+09:00 Subject: Re: How to invoke === using custom classes and case statements. Nikodemus Siivola wrote in message news:... > On Mon, 28 Oct 2002, Khurram wrote: > > > case a > > when 'hello';printf "Blah....\n" > > when 'bye' ; printf "Blah....Blah...\n" > > else; printf "Blah... Blah... Blah...\n" > > end > > This is equivalent to: > > if 'hello' === a > ... > elsif 'bye' === a > ... > else > ... > end > > You see? The case statement uses the argument of the when clause as the > receiver. > > -- Nikodemus Hmmm... so it seems like I cannot use the case statement to test objects of the class I created In the way I originally suggested. I would have to put the class object in the when clause, which seems counter-intuitive. Is there any other way I could do this?