From c818da03e66848882a84582240965db3997f8d15 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 25 Jun 2026 11:37:00 +0900 Subject: [PATCH] [ruby/rubygems] Pass locked_platforms by keyword to candidate_platforms Keeps the locked platform argument keyworded along the whole resolve_best_platform path instead of switching to a positional at the last hop. https://github.com/ruby/rubygems/commit/1d5f35ad0e Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/bundler/lazy_specification.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index aad15176d6..13d7588cd0 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -192,7 +192,7 @@ module Bundler end def find_compatible_platform_spec(specs, locked_platforms: nil) - candidate_platforms(locked_platforms).each do |plat| + candidate_platforms(locked_platforms: locked_platforms).each do |plat| candidates = MatchPlatform.select_best_platform_match(specs, plat) spec = choose_compatible(candidates, fallback_to_non_installable: false) return spec if spec @@ -204,7 +204,7 @@ module Bundler # requires compilation, but works when precompiled gems are incompatible. # When a set of locked platforms is given (frozen mode), restrict the # candidates to those, so we never materialize a platform that wasn't locked. - def candidate_platforms(locked_platforms = nil) + def candidate_platforms(locked_platforms: nil) target = source.is_a?(Source::Path) ? platform : Bundler.local_platform platforms = [target, platform, Gem::Platform::RUBY].uniq return platforms unless locked_platforms