Skip to content

Instantly share code, notes, and snippets.

@glennpratt
Created January 16, 2014 17:10
Show Gist options
  • Select an option

  • Save glennpratt/8458993 to your computer and use it in GitHub Desktop.

Select an option

Save glennpratt/8458993 to your computer and use it in GitHub Desktop.
2.0.0p353 :015 > foo.nil?
NameError: undefined local variable or method `foo' for main:Object
from (irb):15
from /usr/local/.rvm/rubies/ruby-2.0.0-p353/bin/irb:12:in `<main>'
2.0.0p353 :016 > @foo.nil?
=> true
2.0.0p353 :017 > @@foo.nil?
(irb):17: warning: class variable access from toplevel
NameError: uninitialized class variable @@foo in Object
from (irb):17
from /usr/local/.rvm/rubies/ruby-2.0.0-p353/bin/irb:12:in `<main>'
2.0.0p353 :018 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment