"David Vallner" <david / vallner.net> writes:

> On Thu, 12 Jan 2006 14:15:38 +0100, Christian Neukirchen
>>>>    Object.const_set(className.to_s, genClass)
>>>>
>>> And useless #to_s awards. If anything, #to_str is somewhat useful to
>>> get a type check, but coercing types with reckless abandon you'll
>>> shoot yourself in the foot when you least expect it.
>>
>> ...except Symbol doesn't have #to_str.
> Oh, joy. Not like that matters in this specific case, but I can well
> imagine that use. I guess it's time to dig out the metaprogramming
> helmets  to prevent severe trauma when banging heads against walls.

Sorry.  I really wonder what I was thinking when I wrote that.
It has to be like that, of course:

    Object.const_set(className.to_sym, genClass)

This allows for passing of strings and symbols.  (And Fixnums, oh well.)

> David Vallner
-- 
Christian Neukirchen  <chneukirchen / gmail.com>  http://chneukirchen.org