Possible Duplicate:
Undefine variable in Ruby
In php I could do the following:
$myVariable = 'foo';
echo $myVariable;
unset( $myVariable );
How can I do basically the same thing in ruby land?
Possible Duplicate:
Undefine variable in Ruby
In php I could do the following:
$myVariable = 'foo';
echo $myVariable;
unset( $myVariable );
How can I do basically the same thing in ruby land?
You can assign it nil value. Example: your_variable = "yourname" Now, when you want to 'unset' it, you could do your_variable = nil