summaryrefslogtreecommitdiff
path: root/lib
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
parent1b2276af640dd19bb5379b5ad2f870b79cdd016f (diff)
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')
-rw-r--r--lib/resolv.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb
index a801cf6..6498615 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