From 31aae8fdaf13724b571d2cfb1d1c972b483798fc Mon Sep 17 00:00:00 2001 From: root Date: Fri, 20 Sep 2019 06:29:10 +0000 Subject: [PATCH] adding a catch to a possible ruby bug --- Rakefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Rakefile b/Rakefile index 000961efa..3f3d88920 100644 --- a/Rakefile +++ b/Rakefile @@ -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 \ No newline at end of file