From: David Vallner Date: 2006-01-12T22:23:06+09:00 Subject: Re: how can I give a name to an anonymous class On Thu, 12 Jan 2006 14:15:38 +0100, Christian Neukirchen wrote: > David Vallner writes: > >> Christian Neukirchen wrote: >> >>> gwtmp01@mac.com writes: >>> >>> Object.const_set(className.to_s, genClass) >>> >>> I think we should have "useless use of #{}"-awards. ;-) >>> >>> >>> >> 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. David Vallner