From: Daniel Harple Date: 2006-05-10T21:52:46+09:00 Subject: Re: Intantiating a class by name On May 10, 2006, at 6:32 AM, Erich L. Timkar wrote: > For the life of me I haven't been able to find the syntax to > "instatiate" a class given it's name. I know it's silly. I feel > silly > and when I hear the answer, I'll fill twice as silly. Anyone wanna > take > a stab at this and put me out of my misery? class Foo; end def make_new(klass) klass.new end make_new(Foo) # => # Classes and modules are constants. If you have a string containing the class/module name use the inject+const_get solution. -- Daniel