unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / 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	[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, back to index

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

unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/unicorn-public
	git clone --mirror http://ou63pmih66umazou.onion/unicorn-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.unicorn

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox