R
Ralph Shnelvar
[Note: parts of this message were removed to make it a legal post.]
I have a collection of variables named
@a_something, @c_something, @f_something, @y_something, @z_something
I want to do something like
def some_thing(one_char)
xxx = XXXX('@'+one_char+'_something')
subr(xxx)
end
I want
some_thing('c')
to have the same effect as
subr(@c_something)
What should XXXX be (should it be eval ...?)?
This seems to work in 1.8. Will it work in 1.9?
I have read that the dynamic creation of variables in 1.9 is prohibited ... but I'm not sure if this applies in my case since @c_something (etc.) already exists.
I have a collection of variables named
@a_something, @c_something, @f_something, @y_something, @z_something
I want to do something like
def some_thing(one_char)
xxx = XXXX('@'+one_char+'_something')
subr(xxx)
end
I want
some_thing('c')
to have the same effect as
subr(@c_something)
What should XXXX be (should it be eval ...?)?
This seems to work in 1.8. Will it work in 1.9?
I have read that the dynamic creation of variables in 1.9 is prohibited ... but I'm not sure if this applies in my case since @c_something (etc.) already exists.