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/rubygems.rb | |
parent | f1cdc129d4d6440168b840fa852fa6c3e28d46a9 (diff) | |
download | ruby-bbe56a643734025aef6a3cbeb07c5306505040f6.tar.gz |
Merge RubyGems/Bundler master
from https://github.com/rubygems/rubygems/commit/bfb0ae69776069155d2092702bfbb5a12617d85a
Diffstat (limited to 'lib/bundler/source/rubygems.rb')
-rw-r--r-- | lib/bundler/source/rubygems.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 3b640b55a9..7eefd291a2 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -145,7 +145,7 @@ module Bundler end if installed?(spec) && !force - print_using_message "Using #{version_message(spec)}" + print_using_message "Using #{version_message(spec, options[:previous_spec])}" return nil # no post-install message end @@ -163,8 +163,6 @@ module Bundler install_path = rubygems_dir bin_path = Bundler.system_bindir - Bundler.mkdir_p bin_path unless spec.executables.empty? || Bundler.rubygems.provides?(">= 2.7.5") - require_relative "../rubygems_gem_installer" installer = Bundler::RubyGemsGemInstaller.at( @@ -340,7 +338,7 @@ module Bundler def normalize_uri(uri) uri = uri.to_s - uri = "#{uri}/" unless uri =~ %r{/$} + uri = "#{uri}/" unless %r{/$}.match?(uri) require_relative "../vendored_uri" uri = Bundler::URI(uri) raise ArgumentError, "The source must be an absolute URI. For example:\n" \ @@ -383,7 +381,7 @@ module Bundler idx = @allow_local ? installed_specs.dup : Index.new Dir["#{cache_path}/*.gem"].each do |gemfile| - next if gemfile =~ /^bundler\-[\d\.]+?\.gem/ + next if /^bundler\-[\d\.]+?\.gem/.match?(gemfile) s ||= Bundler.rubygems.spec_from_gem(gemfile) s.source = self idx << s |