From: Lyle Johnson Date: 2007-02-15T05:44:27+09:00 Subject: Re: how to do: var1 = var2.new(.....) (var2 contains classname) On 2/14/07, Luca Scaljery wrote: > I have a situation in which I have the name of the class in a variable > So normally I would do > song = Song.new("Bicylops", "Fleck", 260) > > But I need to do something like > var2 = "Song" > var1 = var2.new("Bicylops", "Fleck", 260) > > This doesn't work! > Any suggestions how to do this ? var1 = Object.get_const(var2).new("Bicyclops", "Fleck", 260)