From 9d286180916e23bb2d9e6bf43cd75f439a1939ce Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Sun, 10 Oct 2021 17:21:53 +0200 Subject: [rubygems/rubygems] Avoid loading the `digest` gem unnecessarily OpenSSL includes what we need. https://github.com/rubygems/rubygems/commit/955f3b72ca --- lib/rubygems/source/git.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rubygems/source/git.rb') 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 -- cgit v1.2.3