From: Joel VanderWerf Date: 2009-08-13T05:08:51+09:00 Subject: Re: Class#descendants? Jason Lillywhite wrote: > Joel VanderWerf wrote: >> irb(main):001:0> ObjectSpace.each_object(Class) {|cl| p cl if cl < >> Numeric} > > Thank you. Why does it return 387 after I do this in IRB? > > like this: > irb(main):069:0> ObjectSpace.each_object(Class) {|cl| p cl if cl < Date} > DateTime > => 387 It's the number of instances of Class (since that was the argument). So another example is: irb(main):002:0> ObjectSpace.each_object(String) {} => 4613 (Yep, the empty block is necessary.) -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407