From: Anthony DeRobertis Date: 2006-02-23T07:03:18+09:00 Subject: Converting a string to a class Take the following snippet: module SomeModule class SomeClass SomeConstant = 3.1415 end end var = "SomeModule::SomeClass" print(var::SomeConstant) This raises TypeError. So far, the only way I've found to do this (and let me warn you, I'm quite new to Ruby so I may just be missing something right in front of me) is like this: var = "SomeModule::SomeClass" eval "var = " + var print(var::SomeConstant) which does indeed work, but I figure there has got to be a better way than using eval.