Forum: Ruby how to use a variable reference another variable?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Haofei W. (Guest)
on 2006-12-30 21:50
since variable names are not objects, is there any possible ways to do
this? thank you!
Lionel B. (Guest)
on 2006-12-30 22:11
(Received via mailing list)
Haofei W. wrote the following on 30.12.2006 20:50 :
> since variable names are not objects, is there any possible ways to do
> this? thank you!
>
>
Given that Ruby doesn't allow this, maybe the problem you want to solve
has a simple solution using another language feature. For what
purpose(s) would you want to use variable references?

Lionel
Haofei W. (Guest)
on 2006-12-30 23:03

> Given that Ruby doesn't allow this, maybe the problem you want to solve
> has a simple solution using another language feature. For what
> purpose(s) would you want to use variable references?
>
> Lionel



Just curious. i vaguely have heard of it before
Sy Ali (Guest)
on 2006-12-30 23:31
(Received via mailing list)
On 12/30/06, Haofei W. <removed_email_address@domain.invalid> wrote:
>
> > Given that Ruby doesn't allow this, maybe the problem you want to solve
> > has a simple solution using another language feature. For what
> > purpose(s) would you want to use variable references?
>
> Just curious. i vaguely have heard of it before

If you're interested, I had a thread called "patching strings together
to make a variable" a long while back which had some references to
doing such tricks..
This topic is locked and can not be replied to.