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

envutil.rb: backtrace may not be present

* test/ruby/envutil.rb (assert_separately): SystemStackError at
  machine stack overflow on platforms where sigaltstack is
  unavailable does not have backtrace.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-12-11 01:48:17 +00:00
parent d6a5fe709e
commit 2c11ccb861

View file

@ -345,8 +345,10 @@ eom
ignore_stderr = nil
end
if res
res.backtrace.each do |l|
l.sub!(/\A-:(\d+)/){"#{file}:#{line + $1.to_i}"}
if bt = res.backtrace
bt.each do |l|
l.sub!(/\A-:(\d+)/){"#{file}:#{line + $1.to_i}"}
end
end
raise res
end