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:
parent
38cee6b43e
commit
7d9fe82be4
3 changed files with 11 additions and 5 deletions
|
@ -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>
|
Mon Jan 2 15:05:09 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
* lib/test/unit.rb (Test::Unit::Runner::Worker#run): use
|
* lib/test/unit.rb (Test::Unit::Runner::Worker#run): use
|
||||||
|
|
|
@ -269,7 +269,7 @@ module Test
|
||||||
@file = File.basename(task, ".rb")
|
@file = File.basename(task, ".rb")
|
||||||
@real_file = task
|
@real_file = task
|
||||||
begin
|
begin
|
||||||
puts "loadpath #{[Marshal.dump($:-@loadpath)].pack("m").gsub("\n","")}"
|
puts "loadpath #{[Marshal.dump($:-@loadpath)].pack("m0")}"
|
||||||
@loadpath = $:.dup
|
@loadpath = $:.dup
|
||||||
puts "run #{task} #{type}"
|
puts "run #{task} #{type}"
|
||||||
@status = :prepare
|
@status = :prepare
|
||||||
|
|
|
@ -35,7 +35,7 @@ module Test
|
||||||
th = Thread.new do
|
th = Thread.new do
|
||||||
begin
|
begin
|
||||||
while buf = (self.verbose ? i.gets : i.read(5))
|
while buf = (self.verbose ? i.gets : i.read(5))
|
||||||
@stdout.puts "p #{[buf].pack("m").gsub("\n","")}"
|
@stdout.puts "p #{[buf].pack("m0")}"
|
||||||
end
|
end
|
||||||
rescue IOError
|
rescue IOError
|
||||||
rescue Errno::EPIPE
|
rescue Errno::EPIPE
|
||||||
|
@ -69,7 +69,7 @@ module Test
|
||||||
result << suite.name
|
result << suite.name
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@stdout.puts "done #{[Marshal.dump(result)].pack("m").gsub("\n","")}"
|
@stdout.puts "done #{[Marshal.dump(result)].pack("m0")}"
|
||||||
rescue Errno::EPIPE; end
|
rescue Errno::EPIPE; end
|
||||||
return result
|
return result
|
||||||
ensure
|
ensure
|
||||||
|
@ -106,7 +106,7 @@ module Test
|
||||||
begin
|
begin
|
||||||
require $1
|
require $1
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
@stdout.puts "after #{[Marshal.dump([$1, $!])].pack("m").gsub("\n","")}"
|
@stdout.puts "after #{[Marshal.dump([$1, $!])].pack("m0")}"
|
||||||
@stdout.puts "ready"
|
@stdout.puts "ready"
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
@ -130,7 +130,7 @@ module Test
|
||||||
rescue Errno::EPIPE
|
rescue Errno::EPIPE
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
begin
|
begin
|
||||||
@stdout.puts "bye #{[Marshal.dump(e)].pack("m").gsub("\n","")}"
|
@stdout.puts "bye #{[Marshal.dump(e)].pack("m0")}"
|
||||||
rescue Errno::EPIPE;end
|
rescue Errno::EPIPE;end
|
||||||
exit
|
exit
|
||||||
ensure
|
ensure
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue