From: Hadmut Danisch Date: 2004-12-17T02:42:23+09:00 Subject: Testing global variables for existence? Hi, I need to set a global variable (e.g. $configfile ) to a default value if it has not been set before to anything else. In order to not overwrite it I have to check whether it has been set previously. $configfile.nil? would do the job, but ruby -w spits out a warning that the variable has not yet been initialized. How do I test whether the variable has been set without causing ruby -w to print a warning in case it has not been set? regards Hadmut