Created
August 1, 2012 00:02
-
-
Save kfatehi/3221876 to your computer and use it in GitHub Desktop.
This file contains 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
➜ ~ irb | |
1.9.3p194 :001 > @args = {"foo"=>2} | |
=> {"foo"=>2} | |
1.9.3p194 :002 > :@args | |
=> :@args | |
1.9.3p194 :003 > instance_variable_defined? | |
instance_variable_defined? | |
1.9.3p194 :003 > instance_variable_defined? :@args | |
=> true | |
1.9.3p194 :004 > instance_variable_defined? :@argss | |
=> false | |
1.9.3p194 :005 > instance_variable_defined? :args | |
NameError: `args' is not allowed as an instance variable name | |
from (irb):5:in `instance_variable_defined?' | |
from (irb):5 | |
from /Users/keyvan/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>' | |
1.9.3p194 :006 > instance_variable_defined? :@args | |
=> true | |
1.9.3p194 :007 > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment