From: hemant Date: 2007-07-15T12:23:25+09:00 Subject: Re: Contents of variable as variable name On 7/15/07, Rob Kerfia wrote: > I know that sounds a bit crazy, but is there a way to do that? > One way of doing it is: irb(main):025:0> a = "foo" "foo" irb(main):026:0> eval "#{a}=1" 1 irb(main):027:0> foo 1 Although eval is normally discouraged and must be used sparingly.