Created
July 6, 2017 08:13
-
-
Save AJFaraday/7336e816028b4cec61de4067feec32ed to your computer and use it in GitHub Desktop.
Unexpected Else (ruby)
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
def meth | |
if false | |
puts 'not here' | |
end | |
else | |
puts 'WAT' | |
end | |
# warning: else without rescue is useless | |
meth | |
# WAT | |
def meth2 | |
if true | |
puts 'yes here' | |
end | |
else | |
puts 'WAT' | |
end | |
# warning: else without rescue is useless | |
meth2 | |
# yes here | |
# WAT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment