Merge pull request #1767 from beefproject/raketest

adding a catch to a possible ruby bug
This commit is contained in:
jcrew99
2019-09-20 16:43:32 +10:00
committed by GitHub

View File

@@ -278,3 +278,16 @@ end
################################
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby"
module Kernel
alias :_at_exit :at_exit
def at_exit(&block)
_at_exit do
exit_status = $!.status if $!.is_a?(SystemExit)
block.call
exit exit_status if exit_status
end
end
end
end