From: Alexander Schofield Date: 2001-12-11T16:17:23+09:00 Subject: [ruby-talk:28181] Re: The benefits of dynamic typing? Harry Ohlsen wrote: > > In article <20011211.105127.461152493.1860@zip.com.au>, "Harry Ohlsen" > wrote: > Actually, this makes me wonder ... is there a method somewhere that lets me find out whether a given object's class is a descendent of a given class? If not, one could definitely write such a thing, by running up the superclass hierarchy. Do you mean Object#kind_of? irb(main):017:0> 2.kind_of? Numeric true irb(main):018:0> 2.kind_of? Integer true irb(main):019:0> 2.kind_of? Fixnum true HTH, Alexander Schofield