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

* lib/test/unit/parallel.rb: use pack("m0") instead of

pack("m").gsub("\n","").
* lib/test/unit.rb (Test::Unit::Runner::Worker#run): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2012-01-02 06:13:29 +00:00
parent 38cee6b43e
commit 7d9fe82be4
3 changed files with 11 additions and 5 deletions

View file

@ -1,3 +1,9 @@
Mon Jan 2 15:10:11 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* 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 <zn@mbf.nifty.com>
* lib/test/unit.rb (Test::Unit::Runner::Worker#run): use

View file

@ -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

View file

@ -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