From 5af3f7f3574c16ec76fb44b21beec17a74f4417a Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 18 Oct 2021 10:12:39 +0200 Subject: [rubygems/rubygems] Vendor a pure ruby implementation of SHA1 This allows `Source::Git` to no longer load the `digest` gem as it is causing issues on Ruby 3.1. https://github.com/rubygems/rubygems/pull/4989/commits/c19a9f2ff7 --- lib/bundler/source/git.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/bundler/source/git.rb') diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 679fb22574..a41a2f23e9 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -307,7 +307,9 @@ module Bundler # If there is no URI scheme, assume it is an ssh/git URI input = uri end - SharedHelpers.digest(:SHA1).hexdigest(input) + # We use SHA1 here for historical reason and to preserve backward compatibility. + # But a transition to a simpler mangling algorithm would be welcome. + Bundler::Digest.sha1(input) end def cached_revision -- cgit v1.2.3