summaryrefslogtreecommitdiff
path: root/lib/rubygems/remote_fetcher.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2021-02-01 16:17:16 +0100
committerHiroshi SHIBATA <[email protected]>2021-03-08 13:47:35 +0900
commit53468cc11147b0d285fc376fc546b677dad600ca (patch)
treeeb9c97f544d089be2d324126b025b11f41a22c90 /lib/rubygems/remote_fetcher.rb
parent2ab6b7a7516e1b2c48a66ce513afabb62d101461 (diff)
Sync latest development version of bundler & rubygems
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4143
Diffstat (limited to 'lib/rubygems/remote_fetcher.rb')
-rw-r--r--lib/rubygems/remote_fetcher.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb
index 53e840978c..a14c42f00e 100644
--- a/lib/rubygems/remote_fetcher.rb
+++ b/lib/rubygems/remote_fetcher.rb
@@ -78,6 +78,7 @@ class Gem::RemoteFetcher
# fetching the gem.
def initialize(proxy=nil, dns=nil, headers={})
+ require 'rubygems/core_ext/tcpsocket_init' if Gem.configuration.ipv4_fallback_enabled
require 'net/http'
require 'stringio'
require 'uri'
@@ -295,7 +296,7 @@ class Gem::RemoteFetcher
data = fetch_path(uri, mtime)
- if data == nil # indicates the server returned 304 Not Modified
+ if data.nil? # indicates the server returned 304 Not Modified
return Gem.read_binary(path)
end