Browse Source

Ruby 2.3 compat

master
aeris 2 months ago
parent
commit
aad605e140
  1. 2
      lib/cryptcheck/host.rb

2
lib/cryptcheck/host.rb

@ -75,7 +75,7 @@ module CryptCheck
end
::Addrinfo.getaddrinfo(@hostname, nil, nil, :STREAM)
.collect { |a| [@hostname, a.ip_address, a.afamily, @port] }
end.reject do |_1, _2, family, *_3|
end.reject do |_, _, family, *_|
(ENV['DISABLE_IPv6'] && family == Socket::AF_INET6) ||
(ENV['DISABLE_IPv4'] && family == Socket::AF_INET)
end

Loading…
Cancel
Save