[前][次][番号順一覧][スレッド一覧]

ruby-changes:32051

From: nobu <ko1@a...>
Date: Wed, 11 Dec 2013 10:48:23 +0900 (JST)
Subject: [ruby-changes:32051] nobu:r44130 (trunk): envutil.rb: backtrace may not be present

nobu	2013-12-11 10:48:17 +0900 (Wed, 11 Dec 2013)

  New Revision: 44130

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44130

  Log:
    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.

  Modified files:
    trunk/test/ruby/envutil.rb
Index: test/ruby/envutil.rb
===================================================================
--- test/ruby/envutil.rb	(revision 44129)
+++ test/ruby/envutil.rb	(revision 44130)
@@ -345,8 +345,10 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L345
           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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]