Skip to content

Instantly share code, notes, and snippets.

@sentientmonkey
Created March 22, 2013 23:08
Show Gist options
  • Select an option

  • Save sentientmonkey/5225441 to your computer and use it in GitHub Desktop.

Select an option

Save sentientmonkey/5225441 to your computer and use it in GitHub Desktop.
def main
raise "oh crap!"
end
main
at_exit { puts $! if $! }
# at_exit_example.rb:3:in `main': oh crap! (RuntimeError)
# from at_exit_example.rb:6:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment