Use 127.0.0.1 if getaddrinfo fails.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8baa73be48
commit
94e8036b85
@ -8,7 +8,8 @@ require "tempfile"
|
||||
|
||||
class FTPTest < Test::Unit::TestCase
|
||||
SERVER_NAME = "localhost"
|
||||
SERVER_ADDR = Addrinfo.getaddrinfo(SERVER_NAME, 0)[0].ip_address
|
||||
SERVER_ADDR =
|
||||
Addrinfo.getaddrinfo(SERVER_NAME, 0)[0].ip_address rescue "127.0.0.1"
|
||||
CA_FILE = File.expand_path("../fixtures/cacert.pem", __dir__)
|
||||
SERVER_KEY = File.expand_path("../fixtures/server.key", __dir__)
|
||||
SERVER_CERT = File.expand_path("../fixtures/server.crt", __dir__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user