diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-10-25 23:01:01 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-10-25 23:02:01 +0000 |
commit | 025a67afc97ce65d30bebd61bedf20066d1874c6 (patch) | |
tree | af21ac8c5c724813eae56b188161c24955ca6638 /test/test_wbuf.rb | |
parent | 9bece9d13543743e2a0fdc6eab56c54098d4d0e6 (diff) | |
download | yahns-025a67afc97ce65d30bebd61bedf20066d1874c6.tar.gz |
We need to prevent FD leakage on Ruby 1.9.3
Diffstat (limited to 'test/test_wbuf.rb')
-rw-r--r-- | test/test_wbuf.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_wbuf.rb b/test/test_wbuf.rb index 0923eb0..44ac74e 100644 --- a/test/test_wbuf.rb +++ b/test/test_wbuf.rb @@ -16,7 +16,7 @@ class TestWbuf < Testcase assert_equal "HIHI", b.read(4) nr.times { wbuf.wbuf_write(a, buf) } assert_equal :wait_writable, wbuf.wbuf_flush(a) - done = IO.pipe + done = cloexec_pipe thr = Thread.new do rv = [] until rv[-1] == persist @@ -86,7 +86,7 @@ class TestWbuf < Testcase end def test_wbuf_flush_close - pipe = IO.pipe + pipe = cloexec_pipe persist = true wbuf = Yahns::Wbuf.new(pipe[0], persist) refute wbuf.respond_to?(:close) # we don't want this for HttpResponse body @@ -103,7 +103,7 @@ class TestWbuf < Testcase assert_equal thr, thr.join(5) assert_equal :wait_writable, rv - done = IO.pipe + done = cloexec_pipe thr = Thread.new do rv = [] until rv[-1] == persist |