From: Hugh Sasse Staff Elec Eng Date: 2001-11-23T01:27:22+09:00 Subject: [ruby-talk:26155] Re: Passing class names to constructors. On Fri, 23 Nov 2001, Kent Dahl wrote: > > (10*rand()).times do { > > something = Module.const_get( knotclass ) > mess.push( something.new() ) > > > } > > end Ah, yes, I think that is more what I want. Thank you. > > > > so how do I turn the symbol into the class, so I can do things with it? > > I don't like the obvious way: Deliver Us From Eval! :-) > > > Module.const_get( aSymbol ) # is much nicer that eval > > -- > <[ Kent Dahl ]>================<[ http://www.stud.ntnu.no/~kentda/ ]> Thank you. Hugh