Created
January 6, 2016 02:00
-
-
Save jqr/9699ae38709e576b6d9b to your computer and use it in GitHub Desktop.
Ruby scope issue with if statements
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
if false | |
x = 1 | |
else | |
puts x.inspect # echos "nil", does not raise exception | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment