From: Brian Parkinson Date: 2006-04-10T03:14:10+09:00 Subject: Dumb reflection problem - create object from String Hello - I'm bashing my head against the wall - I'm sure this is a simple question, but damned if I can figure it out. If I have a String which corresponds to a class name, how do I create an instance of this class? Example: class MyExampleClass ... end s = 'MyExampleClass' # We want to instantiate a new instance of the class myExampleClassInstance = ??? I want the behaviour of 'MyExampleClass.new' but only using the String value of s. I'm sure it's a one-liner. Any help appreciated. Thanks. parki... -- Posted via http://www.ruby-forum.com/.