ruby-changes:52105
From: nobu <ko1@a...>
Date: Sun, 12 Aug 2018 09:28:33 +0900 (JST)
Subject: [ruby-changes:52105] nobu:r64313 (trunk): skip non-IP interfaces
nobu 2018-08-12 09:28:26 +0900 (Sun, 12 Aug 2018) New Revision: 64313 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64313 Log: skip non-IP interfaces * spec/ruby/library/socket/socket/getifaddrs_spec.rb: VirtualBox host only adapter seems something different than ordinary interfaces. Modified files: trunk/spec/ruby/library/socket/socket/getifaddrs_spec.rb Index: spec/ruby/library/socket/socket/getifaddrs_spec.rb =================================================================== --- spec/ruby/library/socket/socket/getifaddrs_spec.rb (revision 64312) +++ spec/ruby/library/socket/socket/getifaddrs_spec.rb (revision 64313) @@ -61,7 +61,7 @@ describe 'Socket.getifaddrs' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/socket/getifaddrs_spec.rb#L61 end end - platform_is_not :windows do + platform_is_not :windows do describe 'the Socket::Ifaddr broadcast address' do before do @addrs = @ifaddrs.map(&:broadaddr).compact @@ -83,7 +83,7 @@ describe 'Socket.getifaddrs' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/socket/getifaddrs_spec.rb#L83 describe 'the Socket::Ifaddr netmask address' do before do - @addrs = @ifaddrs.map(&:netmask).compact + @addrs = @ifaddrs.map(&:netmask).compact.select(&:ip?) end it 'is an Addrinfo' do -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/