From: Timothy Hunter Date: 2005-12-01T08:52:30+09:00 Subject: Re: is there a way to get or list all available classes? Daniel Sch�le wrote: > Hello, > > topic says it all > for example irb knows many classes like Dir, File, Process, Thread .. > can I somehow list them, maybe the are kept in some array .. > if it's possible, can additional classes provided through > require "foo" > be listet too? > > I hope my question is clear > thanks in advance > > Regards, Daniel > classes = [] ObjectSpace.each_object {|obj| classes << obj if obj.class == Class} classes = classes.sort_by {|cls| cls.inspect} puts classes