From: Nasir Khan Date: 2007-02-11T06:30:40+09:00 Subject: Idiom for dynamic loading of an unknown class from a known file ------=_Part_43633_12566993.1171143037144 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I need to load a class at runtime, whose name I do not know in advance, but all I know is a file name. Say "a.rb" which is class A ...... end So I want to do something like (pseudo code) - load a.rb (this will create the class object for A) - Somehow access constant "A" and invoke "A.new" I can think of a few hacks but none of them are elegant. Is there an idiom for it? TIA ------=_Part_43633_12566993.1171143037144--