Created
February 16, 2011 19:22
-
-
Save adelcambre/829969 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
rbx-head :001 > foo | |
NameError: undefined local variable or method `foo' on an instance of Object. | |
from Kernel(Object)#foo (method_missing) at kernel/delta/kernel.rb:85 | |
from { } in Object#irb_binding at (irb):1 | |
rbx-head :002 > foo = 123 if false | |
=> nil | |
rbx-head :003 > foo | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Perl does the same thing.
my $foo = 1 if false
defines$foo
, but its value isundef
.