From: "meinrad.recheis" Date: 2003-05-08T06:05:15+09:00 Subject: Re: access a variables name? ok. thanks so far for comments. it was an idea that was not so clear in fact, so i tell you my motivation: i want to configure objects with different values from files. it is possible to configure an object by loading a file and evaluating it's content inside that object: File: configuration.rb @var1 = [1,2] @var2 = {1=>@var1} ... after evaluating this files lines inside the object's namespace @var1 and @var2 do exist as names. maybe i have an interactive program and the user changes values for @var1 or @var2. now i want to overwrite my configuration.rb with the new values that the names @var1 and @var2 reference. so that configuration.rb could be evaluated again. i call this kind of configuration files plugins, because they are mightier than simple configfiles (like xml) which contain only data. plugins could also contain executable code. but code could not be saved back to the file. plugins are straight forward, and cool if there are no security issues, why not? saving a hash to a interpretable string is no problem using #inspect my only problem is saving the names of the object, that are in fact existent in the namespace. is that a little clearer? - m.r.