diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-12 09:09:23 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-12 10:49:43 +0900 |
commit | bbe56a643734025aef6a3cbeb07c5306505040f6 (patch) | |
tree | c6980a39ce6571c032695702bd974431eee4d516 /lib/bundler/source/git.rb | |
parent | f1cdc129d4d6440168b840fa852fa6c3e28d46a9 (diff) |
Merge RubyGems/Bundler master
from https://github.com/rubygems/rubygems/commit/bfb0ae69776069155d2092702bfbb5a12617d85a
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6906
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r-- | lib/bundler/source/git.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 745ae05c5c..dc89dedeb2 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -64,7 +64,7 @@ module Bundler at = if local? path elsif user_ref = options["ref"] - if ref =~ /\A[a-z0-9]{4,}\z/i + if /\A[a-z0-9]{4,}\z/i.match?(ref) shortref_for_display(user_ref) else user_ref @@ -295,7 +295,7 @@ module Bundler end def uri_hash - if uri =~ %r{^\w+://(\w+@)?} + if %r{^\w+://(\w+@)?}.match?(uri) # Downcase the domain component of the URI # and strip off a trailing slash, if one is present input = Bundler::URI.parse(uri).normalize.to_s.sub(%r{/$}, "") |