From: Ralph Shnelvar Date: 2010-08-01T03:13:50+09:00 Subject: Accessing local variables dynamically ------------D51281F61814F02D Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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. ------------D51281F61814F02D--