-
-
Save fsword/3203913 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
def foo | |
111 | |
rescue | |
222 | |
ensure | |
333 | |
end | |
puts foo # got 111 | |
def bar | |
111 | |
rescue | |
222 | |
ensure | |
return 333 | |
end | |
puts bar # got 333 | |
def bar | |
0 / 0 | |
rescue | |
return 222 | |
ensure | |
return 333 | |
end | |
puts bar # got 333 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment