From: Phillip Hutchings Date: 2006-07-08T16:51:55+09:00 Subject: Re: storing and using references to variables On 7/8/06, Russell Fulton wrote: > Hi, > I want to store a reference to a scalar variable (in perl parlance) > in another variable and then assign a value to the stored variable. In Ruby all variables are references to an object, there is no way to make a reference to a reference. If you want to make a change to a string that's referred to by two objects use the in-place operators, they normally are suffixed with an !. eg: foo = 'bar' baz = foo baz = baz.gsub('bar','foo') puts [baz, foo].join('-') => foo-bar vs foo = 'bar' baz = foo baz.gsub!('bar','foo') puts [baz, foo].join('-') => foo-foo If this isn't appropriate you'll have to use a container as you are at the moment. -- Phillip Hutchings http://www.sitharus.com/