Hi,

Both superclass as well as ancestors should do the trick

Integer.ancestors would give you
[Integer, Precision, Numeric, Comparable, Object, Kernel]

while

Integer.superclass would give you
Numeric

I guess, you'll have to do some comparison after this.

regs
Vivek


On Tue, 4 Jun 2002, Matthias Veit wrote:

>
> Hi,
>
> I miss a convenient way to ask a class, if it is a subclass of
> a given superclass (like is_a?, kind_of? for instances).
>
> I wish I could type something like:
>
> Integer.is_superclass?(Fixnum)
>
> Is there a possiblity, I did not know to achieve this?
>
> Best regards,
> Matthias
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>

-- 

Grabel's Law: 2 is not equal to 3 -- not even for large values of 2.