Created
July 8, 2015 17:37
-
-
Save mjgiarlo/73875366bc7e743ce4d8 to your computer and use it in GitHub Desktop.
automatic nilification
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
[1] pry(main)> var1 = 'value1' if false | |
=> nil | |
[2] pry(main)> var1 | |
=> nil | |
[3] pry(main)> if false | |
[3] pry(main)* var2 = 'value2' | |
[3] pry(main)* end | |
=> nil | |
[4] pry(main)> var2 | |
=> nil | |
[5] pry(main)> var3 | |
NameError: undefined local variable or method `var3' for main:Object | |
from (pry):7:in `__pry__' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment