Created
June 3, 2012 09:29
-
-
Save MrJaba/2862745 to your computer and use it in GitHub Desktop.
jRuby Rake file trap test
This file contains 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
desc "Show off odd trap behaviour" | |
task :trap do | |
trap("INT") { puts "trapped INT"; exit(true) } | |
at_exit { puts "here" } | |
puts "sleeping" | |
sleep 10 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment