From: Benoit Cerrina Date: 2001-05-21T06:40:09+09:00 Subject: [ruby-talk:15438] Newbye question: retrieving a Class by its classname Hi, I've been retrieving a Class object by its class name by doing: def XmlElem.getClass4Name(name) if(eval("defined? #{name} and #{name}.type == Class ")) return eval("#name") else return nil end end it seems to work but is it the best way, I try to avoid using eval normally. Benoit