diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-26 15:18:20 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-26 18:16:20 -0700 |
commit | a3c8175a59d9b257c3da4fd608a848c16c10bb70 (patch) | |
tree | fb72c18d1b8013a11987527e52c62a02381d1034 | |
parent | 6c1e02f8cd8d823b80178c7372e6776229d62221 (diff) | |
download | rainbows-a3c8175a59d9b257c3da4fd608a848c16c10bb70.tar.gz |
Array#count is not available until MRI 1.8.7
-rw-r--r-- | lib/rainbows/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index 95d6545..9da148c 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -93,7 +93,7 @@ module Rainbows Rainbows::G.alive = false expire = Time.now + (timeout * 2.0) m = 0 - while (nr = threads.count { |thr| thr.alive? }) > 0 + until (threads.delete_if { |thr| ! thr.alive? }).empty? threads.each { |thr| worker.tmp.chmod(m = 0 == m ? 1 : 0) thr.join(1) |