summaryrefslogtreecommitdiff
path: root/lib/rubygems/source/git.rb
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2021-10-10 17:21:53 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-10-25 20:48:52 +0900
commit9d286180916e23bb2d9e6bf43cd75f439a1939ce (patch)
tree3177653b7c9af3c7012caa80548e10beafeba4c7 /lib/rubygems/source/git.rb
parenta959342abf3c77fc5f08a91107f5f27cfe1766a7 (diff)
[rubygems/rubygems] Avoid loading the `digest` gem unnecessarily
OpenSSL includes what we need. https://github.com/rubygems/rubygems/commit/955f3b72ca
Diffstat (limited to 'lib/rubygems/source/git.rb')
-rw-r--r--lib/rubygems/source/git.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/source/git.rb b/lib/rubygems/source/git.rb
index 95dee9b883..cda5aa8073 100644
--- a/lib/rubygems/source/git.rb
+++ b/lib/rubygems/source/git.rb
@@ -225,7 +225,7 @@ class Gem::Source::Git < Gem::Source
# A hash for the git gem based on the git repository URI.
def uri_hash # :nodoc:
- require 'digest'
+ require_relative '../openssl'
normalized =
if @repository =~ %r{^\w+://(\w+@)?}
@@ -235,6 +235,6 @@ class Gem::Source::Git < Gem::Source
@repository
end
- Digest::SHA1.hexdigest normalized
+ OpenSSL::Digest::SHA1.hexdigest normalized
end
end