From: Ben Bleything Date: 2007-03-06T09:54:17+09:00 Subject: Re: nifty one-liner to search ObjectSpace? On Tue, Mar 06, 2007, Pat Maddox wrote: > How about > ObjectSpace.each_object {|o| puts o.name if o.is_a?(Class) && o < BaseClass} ObjectSpace.each_object takes an optional argument that restricts it to a given class/module, so you can take out the #is_a? check by saying ObjectSpace.each_object( Class ) {} Ben