From: Siep Korteling Date: 2009-04-07T07:47:31+09:00 Subject: Re: class C < B < A I単aki Baz Castillo wrote: > Hi, I have this case: > > class A ; end > class B < A ; end > class C < B ; end > > a = A.new > b = B.new > c = C.new > > > I look for a way (***) to get the following results: > > a) > a *** A => true > a *** B => false > a *** C => false > > b) > b *** A => false (*1) > b *** B => true > b *** C => false > > c) > c *** A => false (*2) > c *** B => true > c *** C => true > (...) > Thanks a lot. The method #kind_of? gives the results you want. regards, Siep -- Posted via http://www.ruby-forum.com/.