Skip to content

Instantly share code, notes, and snippets.

@mikehale
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikehale/0a39533b2f71fe00cb5a to your computer and use it in GitHub Desktop.
Save mikehale/0a39533b2f71fe00cb5a to your computer and use it in GitHub Desktop.
$ ruby
loop {
begin
begin
exit 1
ensure
p $!
raise "foo"
end
rescue RuntimeError;end
sleep 1
}
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
#<SystemExit: exit>
^C-:12:in `sleep': Interrupt
from -:12:in `block in <main>'
from -:1:in `loop'
from -:1:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment