From 14c06bd441e3540148abe929b12ea0b1a8c6f15c Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 2 Dec 2008 06:02:23 +0000 Subject: * 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 --- test/socket/test_tcp.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/socket') 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) -- cgit v1.2.3