ruby-changes:59948
From: Nobuyoshi <ko1@a...>
Date: Fri, 7 Feb 2020 13:47:12 +0900 (JST)
Subject: [ruby-changes:59948] 3d21a75c72 (master): No crafted backtrace for SystemExit
https://git.ruby-lang.org/ruby.git/commit/?id=3d21a75c72 From 3d21a75c72586baee75ab9b9c5335c755ee76793 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 7 Feb 2020 11:09:19 +0900 Subject: No crafted backtrace for SystemExit As SystemExit is ignored, it is just useless. diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb index 836d712..5b65eb9 100644 --- a/tool/lib/test/unit/core_assertions.rb +++ b/tool/lib/test/unit/core_assertions.rb @@ -150,7 +150,7 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/core_assertions.rb#L150 ignore_stderr = nil res = nil end - if res + if res and !(SystemExit === res) if bt = res.backtrace bt.each do |l| l.sub!(/\A-:(\d+)/){"#{file}:#{line + $1.to_i}"} @@ -159,7 +159,7 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/core_assertions.rb#L159 else res.set_backtrace(caller) end - raise res unless SystemExit === res + raise res end # really is it succeed? -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/