diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2026-05-01 12:46:17 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2026-05-07 09:24:54 +0000 |
| commit | b5f31bbd19a1a3130d441479d5c12700b285f0b0 (patch) | |
| tree | 029219727492f70c35096855510667346545c0dd | |
| parent | d763aec78246856d26b58e5cd88d40be2e9c2e96 (diff) | |
[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) <noreply@anthropic.com>
| -rw-r--r-- | spec/bundler/install/gemfile/override_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
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 |
