Some environments do not have IPv6 address of localhost in /etc/hosts

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2018-08-08 08:00:45 +00:00
Родитель 953b7a2056
Коммит 60012d130c
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -37,13 +37,13 @@ describe 'Addrinfo.getaddrinfo' do
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