Created
January 2, 2018 11:37
-
-
Save pointcom/f859f0b65892b51b150a3b14be74e62c 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
# Before you had to use begin | |
lambda do | |
begin | |
raise 'err' | |
rescue | |
$! # => #<RuntimeError: err> | |
end | |
end.call | |
# Now you can simply use rescue | |
lambda do | |
raise 'err' | |
rescue | |
$! # => #<RuntimeError: err> | |
end.call |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment