From: Benjohn Barnes Date: 2006-05-01T22:07:09+09:00 Subject: Re: how to create Class object with name determined at runtime On 28 Apr 2006, at 18:36, Bill Roberts wrote: > I hope someone can help with this - I am a Ruby newbie. > > In my code I want to decide at runtime which type of object to create, > based on a variable holding the name of the class. It (may be) worth noting that because classes are "first class objects" in Ruby, you can reference the actual class's object with a variable, if you wish: class MyClass; end c = MyClass c.new ... sorry if I'm pointing out the very obvious. Cheers, Benj