From: Eugene Scripnik Date: 2003-01-04T00:58:47+09:00 Subject: Re: toplevel modules and classes Friday, January 3, 2003, 5:33:08 PM, you wrote: E>> How do I get all defined toplevel modules and classes? t> Object.constants don't do what you want ? Well... it looks much better than my solution: list = [] ObjectSpace.each_object( Module ) { |c| list << c.name.split( /::/ )[0] } list = list.uniq.sort How do I check if a string is a class/module constant and then convert it to class/module object? -- Best regards, Eugene [team Enticla] mailto:Eugene.Scripnik@itgrp.net