[rubygems/rubygems] Remove compatibility code with old RubyGems

f11e42a3c5
This commit is contained in:
David Rodríguez 2024-10-02 12:32:33 +02:00 committed by git
parent d3e2d23c60
commit e77346153d
2 changed files with 1 additions and 9 deletions

View file

@ -577,7 +577,7 @@ module Bundler
requested_path_gems = definition.requested_specs.select {|s| s.source.is_a?(Source::Path) } requested_path_gems = definition.requested_specs.select {|s| s.source.is_a?(Source::Path) }
path_plugin_files = requested_path_gems.map do |spec| path_plugin_files = requested_path_gems.map do |spec|
Bundler.rubygems.spec_matches_for_glob(spec, "rubygems_plugin#{Bundler.rubygems.suffix_pattern}") spec.matches_for_glob("rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
rescue TypeError rescue TypeError
error_message = "#{spec.name} #{spec.version} has an invalid gemspec" error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
raise Gem::InvalidSpecificationException, error_message raise Gem::InvalidSpecificationException, error_message

View file

@ -70,14 +70,6 @@ module Bundler
default default
end end
def spec_matches_for_glob(spec, glob)
return spec.matches_for_glob(glob) if spec.respond_to?(:matches_for_glob)
spec.load_paths.flat_map do |lp|
Dir["#{lp}/#{glob}#{suffix_pattern}"]
end
end
def stub_set_spec(stub, spec) def stub_set_spec(stub, spec)
stub.instance_variable_set(:@spec, spec) stub.instance_variable_set(:@spec, spec)
end end