On 08.09.2007 15:15, Arlen Christian Mart C. wrote:
I’m wondering – where /is/ the scope of local variables? Is there any
programmatic way to manipulate a local variable [by this, I rather
awkwardly mean – for example, is there a hash on some object of local
variables? Or something similar?] They seem special to me.
There is a fairly easy way to manipulate them:
foo = 10
If your set of variables you need to manipulate is not fixed you better
use a Hash directly. There are some ways to manipulate “unknown” local
variables, but they typically involve using “eval”. You’ll find plenty
of discussions of this topic in the archives.