From: Marc Heiler Date: 2008-03-08T14:13:21+09:00 Subject: Re: Dynamic class thingies? (Okay, not sure how to title this one) > Though I'd already started getting it to work with eval. > Which do you think is better? Or does it matter? Personally I am not one of those that constantly screams "eval is evil". Eval has use cases. In this scenario though, const_get is a lot better than eval IMO. It does exactly what you need here, no need to add more complexity by eval-ing statements - evals tend to be less readable normally too. :) By the way, i think a hierarchy like "A::B::C::D::E" looks rather contrived. In practice I even find it hard to see "A::B::C" hierarchy used a lot, at least at the code parts I had a look at. Normally I see only one Module, and inside it a few other classes (sometimes modules, and then a class inside too, but that is quite rare) -- Posted via http://www.ruby-forum.com/.