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

ruby-changes:40296

From: nobu <ko1@a...>
Date: Fri, 30 Oct 2015 11:31:57 +0900 (JST)
Subject: [ruby-changes:40296] nobu:r52377 (trunk): test_gc.rb: fix failure message

nobu	2015-10-30 11:31:38 +0900 (Fri, 30 Oct 2015)

  New Revision: 52377

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

  Log:
    test_gc.rb: fix failure message
    
    * test/ruby/test_gc.rb (test_interrupt_in_finalizer): append
      signal info to stderr outputs in a proc, not to a proc.

  Modified files:
    trunk/test/ruby/test_gc.rb
Index: test/ruby/test_gc.rb
===================================================================
--- test/ruby/test_gc.rb	(revision 52376)
+++ test/ruby/test_gc.rb	(revision 52377)
@@ -333,9 +333,9 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L333
 
   def get_signal_info
     if RUBY_PLATFORM.include?('solaris')
-      `/usr/bin/psig #{$$}`
+      "\n"+`/usr/bin/psig #{$$}`
     elsif File.exist?('/proc/self/status')
-      IO.read('/proc/self/status')
+      "\n"+IO.read('/proc/self/status')
     else
       ''
     end
@@ -364,7 +364,7 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L364
     unless /mswin|mingw/ =~ RUBY_PLATFORM
       assert_equal("INT", Signal.signame(status.termsig), bug10595)
     end
-    assert_match(/Interrupt/, err.first, proc {err.join("\n")}+get_signal_info)
+    assert_match(/Interrupt/, err.first, proc {err.join("\n")+get_signal_info})
     assert_empty(out)
   end
 

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

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