From: Christopher Swasey Date: 2008-03-04T09:45:00+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. If I understand you properly, you have the name of a variable in a string, and you want to use that string to fetch the actual variable by that name. What you want is Object#instance_variable_get: @a = "@b" @b = ["this is a test"] instance_variable_get(@a) => ["this is a test"] Note that the @ is important. You can always prepend it as needed: instance_variable_get("@" + @a) Christopher