ruby-changes:52011
From: kazu <ko1@a...>
Date: Wed, 8 Aug 2018 17:00:49 +0900 (JST)
Subject: [ruby-changes:52011] kazu:r64226 (trunk): Some environments do not have IPv6 address of localhost in /etc/hosts
kazu 2018-08-08 17:00:45 +0900 (Wed, 08 Aug 2018) New Revision: 64226 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64226 Log: Some environments do not have IPv6 address of localhost in /etc/hosts Modified files: trunk/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb Index: spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb =================================================================== --- spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb (revision 64225) +++ spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb (revision 64226) @@ -37,13 +37,13 @@ describe 'Addrinfo.getaddrinfo' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb#L37 guard -> { SocketSpecs.ipv6_available? } do it 'sets a custom protocol family of the Addrinfo instances' do - array = Addrinfo.getaddrinfo('localhost', 80, Socket::PF_INET6) + array = Addrinfo.getaddrinfo('::1', 80, Socket::PF_INET6) array[0].pfamily.should == Socket::PF_INET6 end it 'sets a corresponding address family based on a custom protocol family' do - array = Addrinfo.getaddrinfo('localhost', 80, Socket::PF_INET6) + array = Addrinfo.getaddrinfo('::1', 80, Socket::PF_INET6) array[0].afamily.should == Socket::AF_INET6 end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/