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

ruby-changes:34220

From: akr <ko1@a...>
Date: Mon, 2 Jun 2014 09:41:46 +0900 (JST)
Subject: [ruby-changes:34220] akr:r46297 (trunk): Suppress warnings.

akr	2014-06-02 00:13:59 +0900 (Mon, 02 Jun 2014)

  New Revision: 46297

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

  Log:
    Suppress warnings.

  Modified files:
    trunk/test/openssl/test_ssl.rb
Index: test/openssl/test_ssl.rb
===================================================================
--- test/openssl/test_ssl.rb	(revision 46296)
+++ test/openssl/test_ssl.rb	(revision 46297)
@@ -175,45 +175,45 @@ class OpenSSL::TestSSL < OpenSSL::SSLTes https://github.com/ruby/ruby/blob/trunk/test/openssl/test_ssl.rb#L175
   end
 
   def test_read_nonblock_without_session
-    start_server(PORT, OpenSSL::SSL::VERIFY_NONE, false){|server, port|
-      sock = TCPSocket.new("127.0.0.1", port)
-      ssl = OpenSSL::SSL::SSLSocket.new(sock)
-      ssl.sync_close = true
+    OpenSSL::TestUtils.silent do
+      start_server(PORT, OpenSSL::SSL::VERIFY_NONE, false){|server, port|
+        sock = TCPSocket.new("127.0.0.1", port)
+        ssl = OpenSSL::SSL::SSLSocket.new(sock)
+        ssl.sync_close = true
 
-      OpenSSL::TestUtils.silent do
         assert_equal :wait_readable, ssl.read_nonblock(100, exception: false)
         ssl.write("abc\n")
         IO.select [ssl]
         assert_equal('a', ssl.read_nonblock(1))
         assert_equal("bc\n", ssl.read_nonblock(100))
         assert_equal :wait_readable, ssl.read_nonblock(100, exception: false)
-      end
-      ssl.close
-    }
+        ssl.close
+      }
+    end
   end
 
   def test_starttls
-    start_server(PORT, OpenSSL::SSL::VERIFY_NONE, false){|server, port|
-      sock = TCPSocket.new("127.0.0.1", port)
-      ssl = OpenSSL::SSL::SSLSocket.new(sock)
-      ssl.sync_close = true
-      str = "x" * 1000 + "\n"
+    OpenSSL::TestUtils.silent do
+      start_server(PORT, OpenSSL::SSL::VERIFY_NONE, false){|server, port|
+        sock = TCPSocket.new("127.0.0.1", port)
+        ssl = OpenSSL::SSL::SSLSocket.new(sock)
+        ssl.sync_close = true
+        str = "x" * 1000 + "\n"
 
-      OpenSSL::TestUtils.silent do
         ITERATIONS.times{
           ssl.puts(str)
           assert_equal(str, ssl.gets)
         }
         starttls(ssl)
-      end
 
-      ITERATIONS.times{
-        ssl.puts(str)
-        assert_equal(str, ssl.gets)
-      }
+        ITERATIONS.times{
+          ssl.puts(str)
+          assert_equal(str, ssl.gets)
+        }
 
-      ssl.close
-    }
+        ssl.close
+      }
+    end
   end
 
   def test_parallel

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

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