summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-02 06:02:23 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-02 06:02:23 +0000
commit14c06bd441e3540148abe929b12ea0b1a8c6f15c (patch)
tree3d500252f22c7dc89d8c2bb97108cd52b258f195
parent67b445f895b2b887acec63172d012ee1f98f833a (diff)
* test/socket/test_tcp.rb (test_recvfrom, test_encoding): shouldn't assume
that th is not nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/socket/test_tcp.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb
index c623c1b58c..cc744709a6 100644
--- a/test/socket/test_tcp.rb
+++ b/test/socket/test_tcp.rb
@@ -18,8 +18,8 @@ assert false, "TODO: doesn't work on mswin32/64" if /mswin/ =~ RUBY_PLATFORM
sock = TCPSocket.open(addr[2], addr[1])
assert_equal(["foo", nil], sock.recvfrom(0x10000))
ensure
- th.kill
- th.join
+ th.kill if th
+ th.join if th
end
def test_encoding
@@ -36,8 +36,8 @@ assert false, "TODO: doesn't work on mswin32/64" if /mswin/ =~ RUBY_PLATFORM
assert_equal("foo\r\n", s)
assert_equal(Encoding.find("ASCII-8BIT"), s.encoding)
ensure
- th.kill
- th.join
+ th.kill if th
+ th.join if th
sock.close if sock
end
end if defined?(TCPSocket)