From: Greg Donald Date: 2008-03-04T08:19:23+09:00 Subject: Re: String to Object name? On 3/3/08, Mariko C. wrote: > I'd like to change a string, for example, "something" and turn it into > an object reference. For example: > > I have string "something," now I'd like to take that and turn it into > > something = "some other string" > > Is this possible? Thanks in advance for any help. I'm not sure how you'd do it otherwise, but using Rails I do it like this: c = "foo".singularize.camelize.constantize bar = c.new -- Greg Donald http://destiney.com/