summaryrefslogtreecommitdiff
path: root/spec/ruby/library
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-03 21:53:21 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-03 21:53:21 +0000
commit81f1285b9cd9d9c99d7dce30eb08c0863159ce90 (patch)
treece5feb3788a461014a7acd5b00683dacbc8ba270 /spec/ruby/library
parentb53cf149ad8d7c46572e4567ca949b4f82ebb22c (diff)
spec/ruby/library/socket/socket/getaddrinfo_spec.rb: avoid nonsensical lookup
"http" is a TCP service, so /etc/services on typical GNU/Linux systems only specify a TCP port for it. Use "discard" since it seems used for other specs and is specified as both TCP and UDP. This caused many CI failures like the following: git clone https://gist.github.com/812a9b747e4c4cb2e844d4be7991cd2d git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/library')
-rw-r--r--spec/ruby/library/socket/socket/getaddrinfo_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/library/socket/socket/getaddrinfo_spec.rb b/spec/ruby/library/socket/socket/getaddrinfo_spec.rb
index bc6e9e8f9d..c9e2e7b13c 100644
--- a/spec/ruby/library/socket/socket/getaddrinfo_spec.rb
+++ b/spec/ruby/library/socket/socket/getaddrinfo_spec.rb
@@ -278,11 +278,11 @@ describe 'Socket.getaddrinfo' do
platform_is_not :windows do
it 'accepts a Fixnum as the protocol family' do
- addr = Socket.getaddrinfo(nil, 'http', :INET, :DGRAM, Socket::IPPROTO_UDP)
+ addr = Socket.getaddrinfo(nil, 'discard', :INET, :DGRAM, Socket::IPPROTO_UDP)
addr[0].should == [
'AF_INET',
- 80,
+ 9,
'127.0.0.1',
'127.0.0.1',
Socket::AF_INET,