Skip to content

Instantly share code, notes, and snippets.

@pointcom
Created January 2, 2018 11:37
Show Gist options
  • Save pointcom/f859f0b65892b51b150a3b14be74e62c to your computer and use it in GitHub Desktop.
Save pointcom/f859f0b65892b51b150a3b14be74e62c to your computer and use it in GitHub Desktop.
# 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