From: Hleb Valoshka <375gnu@gmail.com>
Date: Thu, 15 Mar 2012 21:36:21 +0300
Subject: Test suite fix for IPv6
---
test/test_linux_ipv6.rb | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/test/test_linux_ipv6.rb b/test/test_linux_ipv6.rb
index ec08f28..9e8730a 100644
--- a/test/test_linux_ipv6.rb
+++ b/test/test_linux_ipv6.rb
@@ -12,6 +12,14 @@ class TestLinuxIPv6 < Test::Unit::TestCase
TEST_ADDR = ENV["TEST_HOST6"] || "::1"
+ def setup
+ @to_close = []
+ end
+
+ def teardown
+ @to_close.each { |io| io.close unless io.closed? }
+ end
+
def test_tcp
s = TCPServer.new(TEST_ADDR, 0)
port = s.addr[1]