ruby-changes:57476
From: Kazuhiro <ko1@a...>
Date: Mon, 2 Sep 2019 12:02:29 +0900 (JST)
Subject: [ruby-changes:57476] Kazuhiro NISHIYAMA: 63ab7046a1 (master): Skip POINTOPOINT of IPv4 too instead of IPv6 only
https://git.ruby-lang.org/ruby.git/commit/?id=63ab7046a1 From 63ab7046a1a5c374a52dfa79406fe52d92d80344 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Mon, 2 Sep 2019 10:02:17 +0900 Subject: Skip POINTOPOINT of IPv4 too instead of IPv6 only Fix following error on `utun*`: ``` 1) Error: TestSocket#test_udp_server: Errno::ECONNREFUSED: Connection refused - recvmsg(2) ``` diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb index 6cbf3ed..381b038 100644 --- a/test/socket/test_socket.rb +++ b/test/socket/test_socket.rb @@ -380,11 +380,10 @@ class TestSocket < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/socket/test_socket.rb#L380 in6_ifreq = [ifr_name,ai.to_sockaddr].pack('a16A*') s.ioctl(ulSIOCGIFFLAGS, in6_ifreq) next true if in6_ifreq.unpack('A16L1').last & ulIFF_POINTOPOINT != 0 - else - ifconfig ||= `/sbin/ifconfig` - next true if ifconfig.scan(/^(\w+):(.*(?:\n\t.*)*)/).find do|ifname, value| - value.include?(ai.ip_address) && value.include?('POINTOPOINT') - end + end + ifconfig ||= `/sbin/ifconfig` + next true if ifconfig.scan(/^(\w+):(.*(?:\n\t.*)*)/).find do |_ifname, value| + value.include?(ai.ip_address) && value.include?('POINTOPOINT') end end false -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/