Skip to content

Instantly share code, notes, and snippets.

@tombruijn tombruijn/example-systemexit.rb Secret
Created Oct 11, 2016

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
You can’t perform that action at this time.