summaryrefslogtreecommitdiff
path: root/lib/bundler/lazy_specification.rb
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2023-11-20 12:20:08 +0100
committergit <svn-admin@ruby-lang.org>2023-11-22 13:17:12 +0000
commitc05495530e0308d82a39bb5b248f711f0a485921 (patch)
tree19f244221d648ab6ff66a52e23d5318a56aed2cc /lib/bundler/lazy_specification.rb
parent018e6abf8509c7de2a8efb49741d594b15f49fbf (diff)
[rubygems/rubygems] Fix universal lockfiles regression
If a platform specific variant would not match the current Ruby, we would still be considering it compatible with the initial resolution and adding its platform to the lockfile, but we would later fail to materialize it for installation due to not really being compatible. Fix is to only add platforms for variants that are also compatible with current Ruby and RubyGems versions. https://github.com/rubygems/rubygems/commit/75d1290843
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rw-r--r--lib/bundler/lazy_specification.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index fdd3efb443..ca68ee5652 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -122,9 +122,7 @@ module Bundler
# bad gem.
def __materialize__(candidates, fallback_to_non_installable: Bundler.frozen_bundle?)
search = candidates.reverse.find do |spec|
- spec.is_a?(StubSpecification) ||
- (spec.matches_current_ruby? &&
- spec.matches_current_rubygems?)
+ spec.is_a?(StubSpecification) || spec.matches_current_metadata?
end
if search.nil? && fallback_to_non_installable
search = candidates.last