Skip to content

Instantly share code, notes, and snippets.

@jqr
Forked from baldwindavid/gist:100746
Created April 23, 2009 20:43
Show Gist options
  • Save jqr/100749 to your computer and use it in GitHub Desktop.
Save jqr/100749 to your computer and use it in GitHub Desktop.
irb(main):001:0> thing
NameError: undefined local variable or method `thing' for main:Object
from (irb):1
irb(main):002:0> defined? thing
=> nil
irb(main):003:0> thing = thing
=> nil
irb(main):004:0> thing
=> nil
irb(main):005:0> defined? thing
=> "local-variable"
>> thing2 = raise "z"
RuntimeError: z
from (irb):1
>> thing2
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment