H
Hadmut Danisch
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
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