summaryrefslogtreecommitdiffstats
path: root/test/socket
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-04 05:19:15 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-04 05:19:15 +0000
commit9660eccecd48bdf6ac42af57c5e5ce8c07a028b7 (patch)
tree66b13c8fbedb1ca99316c91644b6fab0418682bb /test/socket
parent77f9e7ab82446d70f09388f53188b01eb4a7bf3a (diff)
downloadruby-9660eccecd48bdf6ac42af57c5e5ce8c07a028b7.tar.gz
ruby-9660eccecd48bdf6ac42af57c5e5ce8c07a028b7.tar.xz
ruby-9660eccecd48bdf6ac42af57c5e5ce8c07a028b7.zip
merges r20440 from trunk into ruby_1_9_1.
* test/socket/test_tcp.rb (test_recvfrom, test_encoding): shouldn't assume that th is not nil. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket')
-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 c623c1b58..cc744709a 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)