summaryrefslogtreecommitdiff
path: root/test/lib/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-13 10:07:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-13 10:07:01 +0000
commitbeb1c085d582b4ac187309560eb871dda5bc3c28 (patch)
tree70a84bbd1128ba33d3101bf9323a6977e6b2c754 /test/lib/test
parent42f1ff127249fe4d86c0f7b7ef2b920cbb71601b (diff)
use Timeout.timeout
* time: Object#timeout has been deprecated a long time ago, use Timeout.timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/test')
-rw-r--r--test/lib/test/unit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb
index 3c022b7..0473ddb 100644
--- a/test/lib/test/unit.rb
+++ b/test/lib/test/unit.rb
@@ -292,7 +292,7 @@ module Test
return if @workers.empty?
@workers.reject! do |worker|
begin
- timeout(1) do
+ Timeout.timeout(1) do
worker.quit
end
rescue Errno::EPIPE
@@ -303,7 +303,7 @@ module Test
return if @workers.empty?
begin
- timeout(0.2 * @workers.size) do
+ Timeout.timeout(0.2 * @workers.size) do
Process.waitall
end
rescue Timeout::Error