diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/test/unit.rb | 2 | ||||
-rw-r--r-- | lib/test/unit/parallel.rb | 8 |
3 files changed, 11 insertions, 5 deletions
@@ -1,3 +1,9 @@ +Mon Jan 2 15:10:11 2012 Kazuhiro NISHIYAMA <[email protected]> + + * lib/test/unit/parallel.rb: use pack("m0") instead of + pack("m").gsub("\n",""). + * lib/test/unit.rb (Test::Unit::Runner::Worker#run): ditto. + Mon Jan 2 15:05:09 2012 Kazuhiro NISHIYAMA <[email protected]> * lib/test/unit.rb (Test::Unit::Runner::Worker#run): use diff --git a/lib/test/unit.rb b/lib/test/unit.rb index 71b0132ab8..fa95aae2b2 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -269,7 +269,7 @@ module Test @file = File.basename(task, ".rb") @real_file = task begin - puts "loadpath #{[Marshal.dump($:-@loadpath)].pack("m").gsub("\n","")}" + puts "loadpath #{[Marshal.dump($:-@loadpath)].pack("m0")}" @loadpath = $:.dup puts "run #{task} #{type}" @status = :prepare diff --git a/lib/test/unit/parallel.rb b/lib/test/unit/parallel.rb index 3ce95b9bd8..049b470e40 100644 --- a/lib/test/unit/parallel.rb +++ b/lib/test/unit/parallel.rb @@ -35,7 +35,7 @@ module Test th = Thread.new do begin while buf = (self.verbose ? i.gets : i.read(5)) - @stdout.puts "p #{[buf].pack("m").gsub("\n","")}" + @stdout.puts "p #{[buf].pack("m0")}" end rescue IOError rescue Errno::EPIPE @@ -69,7 +69,7 @@ module Test result << suite.name begin - @stdout.puts "done #{[Marshal.dump(result)].pack("m").gsub("\n","")}" + @stdout.puts "done #{[Marshal.dump(result)].pack("m0")}" rescue Errno::EPIPE; end return result ensure @@ -106,7 +106,7 @@ module Test begin require $1 rescue LoadError - @stdout.puts "after #{[Marshal.dump([$1, $!])].pack("m").gsub("\n","")}" + @stdout.puts "after #{[Marshal.dump([$1, $!])].pack("m0")}" @stdout.puts "ready" next end @@ -130,7 +130,7 @@ module Test rescue Errno::EPIPE rescue Exception => e begin - @stdout.puts "bye #{[Marshal.dump(e)].pack("m").gsub("\n","")}" + @stdout.puts "bye #{[Marshal.dump(e)].pack("m0")}" rescue Errno::EPIPE;end exit ensure |