Permalink
Browse files

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.

mtsmfm#2
  • Loading branch information...
Fumiaki MATSUSHIMA Eric Wong
Fumiaki MATSUSHIMA authored and Eric Wong committed Feb 24, 2018
1 parent 1e486b7 commit 8cc911d4ff667c3f1af28db4c565cdbe22433e34
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/unit/test_ccc.rb
View
@@ -44,7 +44,7 @@ def test_ccc_tcpi
# 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'

0 comments on commit 8cc911d

Please sign in to comment.