From b5f31bbd19a1a3130d441479d5c12700b285f0b0 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 1 May 2026 12:46:17 +0900 Subject: [ruby/rubygems] Add :ignore_upper integration coverage Verify end-to-end that override(..., version: :ignore_upper) drops < / <= bounds and folds ~> into >= so a Gemfile-pinned 0.9.1 ceiling no longer prevents myrack 1.0.0 from being chosen. https://github.com/ruby/rubygems/commit/95224cff50 Co-Authored-By: Claude Opus 4.7 (1M context) --- spec/bundler/install/gemfile/override_spec.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/spec/bundler/install/gemfile/override_spec.rb b/spec/bundler/install/gemfile/override_spec.rb index 4f2eb8544d..0b5f868d42 100644 --- a/spec/bundler/install/gemfile/override_spec.rb +++ b/spec/bundler/install/gemfile/override_spec.rb @@ -66,4 +66,26 @@ RSpec.describe "override DSL" do expect(the_bundle).to include_gems "has_prerelease 1.1.pre" end end + + context "with a version: :ignore_upper operation" do + it "strips a < upper bound on a direct dependency" do + install_gemfile <<-G + source "https://gem.repo1" + override "myrack", version: :ignore_upper + gem "myrack", "< 1.0" + G + + expect(the_bundle).to include_gems "myrack 1.0.0" + end + + it "folds ~> into >= so newer versions become reachable" do + install_gemfile <<-G + source "https://gem.repo1" + override "myrack", version: :ignore_upper + gem "myrack", "~> 0.9.1" + G + + expect(the_bundle).to include_gems "myrack 1.0.0" + end + end end -- cgit v1.2.3