[前][次][番号順一覧][スレッド一覧]

ruby-changes:8904

From: usa <ko1@a...>
Date: Tue, 2 Dec 2008 15:02:33 +0900 (JST)
Subject: [ruby-changes:8904] Ruby:r20440 (trunk): * test/socket/test_tcp.rb (test_recvfrom, test_encoding): shouldn't assume

usa	2008-12-02 15:02:23 +0900 (Tue, 02 Dec 2008)

  New Revision: 20440

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20440

  Log:
    * test/socket/test_tcp.rb (test_recvfrom, test_encoding): shouldn't assume
      that th is not nil.

  Modified files:
    trunk/test/socket/test_tcp.rb

Index: test/socket/test_tcp.rb
===================================================================
--- test/socket/test_tcp.rb	(revision 20439)
+++ test/socket/test_tcp.rb	(revision 20440)
@@ -18,8 +18,8 @@
     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_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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]