From bb28d902e8ce770e7971505c28fa31f441969776 Mon Sep 17 00:00:00 2001 From: kazu Date: Mon, 2 Jan 2012 05:56:55 +0000 Subject: [PATCH] * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): find may return nil and nil can not dup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/test/unit.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 43838901de..93ffa9faaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 2 14:55:28 2012 Kazuhiro NISHIYAMA + + * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): find may + return nil and nil can not dup. + Sun Jan 1 12:23:10 2012 Akinori MUSHA * lib/shellwords.rb (Shellwords#shellescape): Drop the //n flag diff --git a/lib/test/unit.rb b/lib/test/unit.rb index 00313a3237..1bee643c31 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -433,8 +433,9 @@ module Test while stat = Process.wait2 break if @interrupt # Break when interrupt pid, stat = stat - w = (@workers + @dead_workers).find{|x| pid == x.pid }.dup + w = (@workers + @dead_workers).find{|x| pid == x.pid } next unless w + w = w.dup if w.status != :quit && !w.quit_called? # Worker down w.died(nil, !stat.signaled? && stat.exitstatus)