From: Pit Capitain Date: 2007-03-06T17:07:11+09:00 Subject: Re: nifty one-liner to search ObjectSpace? Giles Bowkett schrieb: > Say I've got a class and I know it has subclasses. I'm absolutely sure > there must be an irb ObjectSpace one-liner to give me all the > subclasses of an arbitrary class. > (...) > I know it exists. I just don't know what it is. I'm also kind of > stymied because it appears ObjectSpace has #each_object but not #each. > That seems so weird to me. Giles, here's something for both of your wishes: require "enumerator" s = Exception # substitute with your superclass puts ObjectSpace.to_enum(:each_object, class<