unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] Use IO#wait instead to fix test for Ruby 1.9
@ 2018-02-24  7:06 Fumiaki MATSUSHIMA
  2018-02-24  8:08 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Fumiaki MATSUSHIMA @ 2018-02-24  7:06 UTC (permalink / raw)
  To: unicorn-public; +Cc: mtsmfm

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 @@ 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'
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Use IO#wait instead to fix test for Ruby 1.9
  2018-02-24  7:06 [PATCH] Use IO#wait instead to fix test for Ruby 1.9 Fumiaki MATSUSHIMA
@ 2018-02-24  8:08 ` Eric Wong
  2018-02-25 11:34   ` Fumiaki Matsushima
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2018-02-24  8:08 UTC (permalink / raw)
  To: Fumiaki MATSUSHIMA; +Cc: unicorn-public, mtsmfm

Fumiaki MATSUSHIMA <mtsm.fm@gmail.com> wrote:
> IO#wait_readable is introduced since 2.0
> 
> I confirmed we can pass tests for all versions of Ruby with this patch.

Thanks, applied.  Not sure if it's worth making a new release
to fix a test case, so I might wait a bit and see if there's
other stuff.

Also curious, how long do folks intend to continue using 1.9.3?

I don't care for whatever ruby-core claims to support, I know
realistically some folks (including distros) continue using older
versions for a while and I'll do my best to support them.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Use IO#wait instead to fix test for Ruby 1.9
  2018-02-24  8:08 ` Eric Wong
@ 2018-02-25 11:34   ` Fumiaki Matsushima
  0 siblings, 0 replies; 3+ messages in thread
From: Fumiaki Matsushima @ 2018-02-25 11:34 UTC (permalink / raw)
  To: unicorn-public

Thanks!

> I don't care for whatever ruby-core claims to support

Honestly, I don't use not maintained versions.

On Sat, Feb 24, 2018 at 5:08 PM, Eric Wong <e@80x24.org> wrote:
> Fumiaki MATSUSHIMA <mtsm.fm@gmail.com> wrote:
>> IO#wait_readable is introduced since 2.0
>>
>> I confirmed we can pass tests for all versions of Ruby with this patch.
>
> Thanks, applied.  Not sure if it's worth making a new release
> to fix a test case, so I might wait a bit and see if there's
> other stuff.
>
> Also curious, how long do folks intend to continue using 1.9.3?
>
> I don't care for whatever ruby-core claims to support, I know
> realistically some folks (including distros) continue using older
> versions for a while and I'll do my best to support them.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-25 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-24  7:06 [PATCH] Use IO#wait instead to fix test for Ruby 1.9 Fumiaki MATSUSHIMA
2018-02-24  8:08 ` Eric Wong
2018-02-25 11:34   ` Fumiaki Matsushima

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).