summaryrefslogtreecommitdiff
path: root/test/socket/test_tcp.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-09 01:19:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-09 01:19:30 +0000
commit32481c4126c09a659dd240a44fe27a2af513dd52 (patch)
tree16a2e1d47612de8d9aa0db389a8c4b3a70f3278e /test/socket/test_tcp.rb
parentbfb31fdd22e3d5680d87d926704caff374b77f3c (diff)
* test/socket/test_socket.rb (test_setsockopt): use SO_LINGER instead
of SO_BINDTODEVICE. fixed: [ruby-dev:25133] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket/test_tcp.rb')
-rw-r--r--test/socket/test_tcp.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb
index a1657f027d..596919082f 100644
--- a/test/socket/test_tcp.rb
+++ b/test/socket/test_tcp.rb
@@ -9,7 +9,7 @@ class TestTCPSocket < Test::Unit::TestCase
def test_recvfrom # [ruby-dev:24705]
c = s = nil
svr = TCPServer.new("localhost", 0)
- Thread.new {
+ th = Thread.new {
c = svr.accept
ObjectSpace.each_object(String) {|s|
s.replace "a" if s.length == 0x10000 and !s.frozen?
@@ -21,5 +21,7 @@ class TestTCPSocket < Test::Unit::TestCase
assert_raise(RuntimeError, SocketError) {
sock.recvfrom(0x10000)
}
+ ensure
+ th.join
end
end if defined?(TCPSocket)