From beb1c085d582b4ac187309560eb871dda5bc3c28 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 13 Jul 2015 10:07:01 +0000 Subject: 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 --- test/ruby/test_readpartial.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/ruby/test_readpartial.rb') diff --git a/test/ruby/test_readpartial.rb b/test/ruby/test_readpartial.rb index 7f2ec65ac7..bc84da7d12 100644 --- a/test/ruby/test_readpartial.rb +++ b/test/ruby/test_readpartial.rb @@ -51,7 +51,7 @@ class TestReadPartial < Test::Unit::TestCase assert_equal('ab', r.readpartial(2)) assert_equal('c', r.readpartial(2)) assert_raise(Timeout::Error) { - timeout(0.1) { r.readpartial(2) } + Timeout.timeout(0.1) { r.readpartial(2) } } } end @@ -65,7 +65,7 @@ class TestReadPartial < Test::Unit::TestCase assert_equal("f\n", r.readpartial(4096)) assert_equal("ghi\n", r.readpartial(4096)) assert_raise(Timeout::Error) { - timeout(0.1) { r.readpartial(2) } + Timeout.timeout(0.1) { r.readpartial(2) } } } end -- cgit v1.2.3