mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
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
This commit is contained in:
parent
42f1ff1272
commit
beb1c085d5
16 changed files with 43 additions and 43 deletions
|
@ -355,7 +355,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase
|
|||
req = Net::HTTP::Get.new("/")
|
||||
req['Connection'] = 'Keep-Alive'
|
||||
begin
|
||||
timeout(2) do
|
||||
Timeout.timeout(2) do
|
||||
http.request(req){|res| assert_equal("foo", res.body) }
|
||||
end
|
||||
rescue Timeout::Error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue