From: Christian Neukirchen Date: 2006-01-12T22:15:38+09:00 Subject: Re: how can I give a name to an anonymous class David Vallner writes: > Christian Neukirchen wrote: > >>gwtmp01@mac.com writes: >> >> >> >>>On Jan 11, 2006, at 10:38 AM, sayoyo@yahoo.com wrote: >>> >>> >>>>const_set("#{className.to_s}", genClass) >>>> >>>> >>>Just change this to: >>> >>> Object.const_set("#{className.to_s}", genClass) >>> >>> >> 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. > David Vallner -- Christian Neukirchen http://chneukirchen.org