summaryrefslogtreecommitdiffstats
path: root/test
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
commitfe70ac0b2d8962c38771875562f9ce5edf83da61 (patch)
tree3d500252f22c7dc89d8c2bb97108cd52b258f195 /test
parent6bea654e9b80b86e859c054ad8c8cedd027ffdf4 (diff)
downloadruby-fe70ac0b2d8962c38771875562f9ce5edf83da61.tar.gz
ruby-fe70ac0b2d8962c38771875562f9ce5edf83da61.tar.xz
ruby-fe70ac0b2d8962c38771875562f9ce5edf83da61.zip
* 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/trunk@20440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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)