diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-04 04:53:33 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-04 04:53:33 +0000 |
commit | a5b1a0376f5a3cd6b3a7643da53f9995f0c86346 (patch) | |
tree | 0a201d32f050e1d5c2323ccf88276cb3e97474b8 | |
parent | 64f7deb0cb8c5e57d253d491deef82b60327e60e (diff) | |
download | ruby-a5b1a0376f5a3cd6b3a7643da53f9995f0c86346.tar.gz |
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
-rw-r--r-- | test/net/ftp/test_ftp.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index e586e5e231..64592765e8 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -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__) |