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

ruby-changes:45516

From: nobu <ko1@a...>
Date: Fri, 10 Feb 2017 10:13:26 +0900 (JST)
Subject: [ruby-changes:45516] nobu:r57589 (trunk): parallel.rb: fix intervention

nobu	2017-02-10 10:13:22 +0900 (Fri, 10 Feb 2017)

  New Revision: 57589

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

  Log:
    parallel.rb: fix intervention
    
    * test/lib/test/unit/parallel.rb (_report): send a response and a
      newline atomically, to get rid of intervention with "p" which
      runs in a separate thread.

  Modified files:
    trunk/test/lib/test/unit/parallel.rb
Index: test/lib/test/unit/parallel.rb
===================================================================
--- test/lib/test/unit/parallel.rb	(revision 57588)
+++ test/lib/test/unit/parallel.rb	(revision 57589)
@@ -152,8 +152,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/parallel.rb#L152
       end
 
       def _report(res, *args) # :nodoc:
-        res = "#{res} #{args.pack("m0")}" unless args.empty?
-        @stdout.puts(res)
+        @stdout.write(args.empty? ? "#{res}\n" : "#{res} #{args.pack("m0")}\n")
       end
 
       def puke(klass, meth, e) # :nodoc:

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

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