Created
July 25, 2011 15:31
-
-
Save rubychan/1104396 to your computer and use it in GitHub Desktop.
playing with instance variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.8.7 > @foo = 42 | |
=> 42 | |
ruby-1.8.7 > @foo | |
=> 42 | |
ruby-1.8.7 > @foo = nil | |
=> nil | |
ruby-1.8.7 > @foo | |
=> nil | |
ruby-1.8.7 > remove_instance_variable :@foo | |
=> nil | |
ruby-1.8.7 > @foo | |
=> nil | |
ruby-1.8.7 > $VERBOSE = true | |
=> true | |
ruby-1.8.7 > @foo | |
(irb):10: warning: instance variable @foo not initialized | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment