diff --git a/test/webrick/test_httpserver.rb b/test/webrick/test_httpserver.rb index bbfef53611..ffebf7e843 100644 --- a/test/webrick/test_httpserver.rb +++ b/test/webrick/test_httpserver.rb @@ -115,10 +115,10 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase host3 = httpd(addr1, port1, name2, alias1), host4 = httpd(addr1, port2, name1, nil), host5 = httpd(addr1, port2, name2, alias1), - host6 = httpd(addr1, port2, name3, alias2), + httpd(addr1, port2, name3, alias2), host7 = httpd(addr2, nil, name1, nil), host8 = httpd(addr2, nil, name2, alias1), - host9 = httpd(addr2, nil, name3, alias2), + httpd(addr2, nil, name3, alias2), host10 = httpd(local, nil, nil, nil), host11 = httpd(nil, port3, nil, nil), ].sort_by{ rand } @@ -235,7 +235,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase } server.virtual_host(WEBrick::HTTPServer.new(vhost_config)) - true while server.status != :Running + Thread.pass while server.status != :Running assert_equal(started, 1, log.call) assert_equal(stopped, 0, log.call) assert_equal(accepted, 0, log.call) @@ -356,7 +356,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase :RequestHandler => Proc.new{|req, res| requested += 1 }, } TestWEBrick.start_httpserver(config){|server, addr, port, log| - true while server.status != :Running + Thread.pass while server.status != :Running http = Net::HTTP.new(addr, port) req = Net::HTTP::Get.new("/")