Last active
August 29, 2015 14:20
-
-
Save stungeye/894bc88c9f1bc904d03b to your computer and use it in GitHub Desktop.
Trap Ctrl-C and exit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Signal.trap("INT") do | |
| puts "L8r Sk8r!" | |
| exit | |
| end | |
| loop do | |
| puts "Forever is longer than you'd imagine." | |
| sleep 1 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment