Skip to content

Instantly share code, notes, and snippets.

@tombruijn
Created October 11, 2016 12:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
SystemExit rescue example
#!/usr/bin/env ruby
# $ ruby system.rb
loop do
begin
exit 1
rescue SystemExit => e
print "I should exit, but I don't"
end
print " - "
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment