From 8cc911d4ff667c3f1af28db4c565cdbe22433e34 Mon Sep 17 00:00:00 2001 From: Fumiaki MATSUSHIMA Date: Sat, 24 Feb 2018 16:06:36 +0900 Subject: Use IO#wait instead to fix test for Ruby 1.9 IO#wait_readable is introduced since 2.0 I confirmed we can pass tests for all versions of Ruby with this patch. https://github.com/mtsmfm/unicorn/pull/2 --- test/unit/test_ccc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/test_ccc.rb b/test/unit/test_ccc.rb index 0db0c38..3be1439 100644 --- a/test/unit/test_ccc.rb +++ b/test/unit/test_ccc.rb @@ -44,7 +44,7 @@ class TestCccTCPI < Test::Unit::TestCase # make sure the server is running, at least client = TCPSocket.new(host, port) client.write("GET / HTTP/1.1\r\nHost: example.com\r\n\r\n") - assert client.wait_readable(10), 'never got response from server' + assert client.wait(10), 'never got response from server' res = client.read assert_match %r{\AHTTP/1\.1 200}, res, 'got part of first response' assert_match %r{\r\n\r\n\z}, res, 'got end of response, server is ready' -- cgit v1.2.3-24-ge0c7