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

ruby-changes:28593

From: akr <ko1@a...>
Date: Sat, 11 May 2013 22:09:08 +0900 (JST)
Subject: [ruby-changes:28593] akr:r40645 (trunk): * test/rinda/test_rinda.rb: Socket.getifaddrs may returns an interface

akr	2013-05-11 22:08:59 +0900 (Sat, 11 May 2013)

  New Revision: 40645

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

  Log:
    * test/rinda/test_rinda.rb: Socket.getifaddrs may returns an interface
      which #addr method returns nil for venet0 in OpenVZ.

  Modified files:
    trunk/ChangeLog
    trunk/test/rinda/test_rinda.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40644)
+++ ChangeLog	(revision 40645)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat May 11 22:07:42 2013  Tanaka Akira  <akr@f...>
+
+	* test/rinda/test_rinda.rb: Socket.getifaddrs may returns an interface
+	  which #addr method returns nil for venet0 in OpenVZ.
+
 Sat May 11 21:56:34 2013  Tanaka Akira  <akr@f...>
 
 	* ext/socket/raddrinfo.c (rsock_inspect_sockaddr): Add casts to
Index: test/rinda/test_rinda.rb
===================================================================
--- test/rinda/test_rinda.rb	(revision 40644)
+++ test/rinda/test_rinda.rb	(revision 40645)
@@ -533,9 +533,7 @@ end https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L533
 module RingIPv6
   def prepare_ipv6(r)
     Socket.getifaddrs.each do |ifaddr|
-      p ifaddr
-    end
-    Socket.getifaddrs.each do |ifaddr|
+      next unless ifaddr.addr
       next unless ifaddr.addr.ipv6_linklocal?
       next if ifaddr.name[0, 2] == "lo"
       r.multicast_interface = ifaddr.ifindex

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

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