From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: spew@80x24.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id CB20A1FD52 for ; Thu, 22 Oct 2015 22:16:35 +0000 (UTC) From: Eric Wong To: spew@80x24.org Subject: [PATCH] test/io/wait/test_io_wait.rb (test_wait_eof): test return value Date: Thu, 22 Oct 2015 22:16:35 +0000 Message-Id: <20151022221635.1533-1-e@80x24.org> List-Id: I wrote some code which relies on this nowadays, but Ruby <=2.2 and earlier behaved differently... --- test/io/wait/test_io_wait.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/io/wait/test_io_wait.rb b/test/io/wait/test_io_wait.rb index 48f6cf5..bef4731 100644 --- a/test/io/wait/test_io_wait.rb +++ b/test/io/wait/test_io_wait.rb @@ -70,9 +70,11 @@ class TestIOWait < Test::Unit::TestCase def test_wait_eof th = Thread.new { sleep 0.01; @w.close } + ret = nil assert_nothing_raised(Timeout::Error) do - Timeout.timeout(0.1) {@r.wait} + Timeout.timeout(0.1) { ret = @r.wait } end + assert_equal @r, ret ensure th.join end -- EW