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

ruby-changes:41222

From: naruse <ko1@a...>
Date: Fri, 25 Dec 2015 02:53:29 +0900 (JST)
Subject: [ruby-changes:41222] naruse:r53294 (trunk): ignore exception is the address is IPv6

naruse	2015-12-25 02:53:11 +0900 (Fri, 25 Dec 2015)

  New Revision: 53294

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

  Log:
    ignore exception is the address is IPv6
    
    some environments disables IPv6 even if they have IPv6 addresses.

  Modified files:
    trunk/test/socket/test_socket.rb
Index: test/socket/test_socket.rb
===================================================================
--- test/socket/test_socket.rb	(revision 53293)
+++ test/socket/test_socket.rb	(revision 53294)
@@ -240,9 +240,12 @@ class TestSocket < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/socket/test_socket.rb#L240
           unix_server = Socket.unix_server_socket("#{tmpdir}/sock")
           tcp_servers.each {|s|
             addr = s.connect_address
-            assert_nothing_raised("connect to #{addr.inspect}") {
+            begin
               clients << addr.connect
-            }
+            rescue
+              # allow failure if the address is IPv6
+              raise unless addr.ipv6?
+            end
           }
           addr = unix_server.connect_address
           assert_nothing_raised("connect to #{addr.inspect}") {

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

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