diff options
Diffstat (limited to 'test/test_linux_ipv6.rb')
-rw-r--r-- | test/test_linux_ipv6.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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] |