Hello Khurram,

Wednesday, October 30, 2002, 5:37:41 PM, you wrote:

>> > case a
>> > when 'hello';printf "Blah....\n"
>> > when 'bye' ; printf "Blah....Blah...\n"
>> > else; printf "Blah... Blah... Blah...\n"
>> > end
K> Hmmm... so it seems like I cannot use the case statement to test
K> objects of the class I created In the way I originally suggested.

you can redefine '===' in String class:

class String
  alias :old_eq, :===
  def ===(x)
    MyType === x? x.compare(self) : old_eq(x)
  end
end



-- 
Best regards,
 Bulat                            mailto:bulatz / integ.ru