1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

No crafted backtrace for SystemExit

As SystemExit is ignored, it is just useless.
This commit is contained in:
Nobuyoshi Nakada 2020-02-07 11:09:19 +09:00
parent 8c67080381
commit 3d21a75c72
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -150,7 +150,7 @@ eom
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
else
res.set_backtrace(caller)
end
raise res unless SystemExit === res
raise res
end
# really is it succeed?