summaryrefslogtreecommitdiff
path: root/lib/resolv.rb
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-07 22:19:19 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-07 22:19:19 +0000
commit89ba151440a243e44fc6afa93eed871887cbf195 (patch)
tree74f441c3c64d39ed7b004208fe449698ac67056b /lib/resolv.rb
parent1b2276af640dd19bb5379b5ad2f870b79cdd016f (diff)
downloadruby-89ba151440a243e44fc6afa93eed871887cbf195.tar.gz
lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
This allows "gem install /path/to/local.gem" to be successful on a machine without a network connection. [ruby-core:67411] [Bug #10712] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/resolv.rb')
-rw-r--r--lib/resolv.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb
index a801cf6ff4..6498615d79 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -670,8 +670,8 @@ class Resolv
timelimit = start + tout
begin
sender.send
- rescue Errno::EHOSTUNREACH
- # multi-homed IPv6 may generate this
+ rescue Errno::EHOSTUNREACH, # multi-homed IPv6 may generate this
+ Errno::ENETUNREACH
raise ResolvTimeout
end
while true