diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2026-05-07 18:40:15 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2026-05-08 06:43:38 +0000 |
| commit | 13313f9436fb75e3da965a8ce8db9e4b96849111 (patch) | |
| tree | d5b6a5e1d2ec67af9fa288db764c844b050d1b20 | |
| parent | c0a9fdc030b92930cef3ed398ad274a12e44ef97 (diff) | |
[ruby/rubygems] Assert that override directives never leak into the lockfile
Lock the byroot policy decision (overrides are a Gemfile concept and
must not be serialized into Gemfile.lock) with a regression test, so a
future change that starts emitting override metadata in the lock would
fail loudly.
https://github.com/ruby/rubygems/commit/9524b785c5
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| -rw-r--r-- | spec/bundler/install/gemfile/override_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/bundler/install/gemfile/override_spec.rb b/spec/bundler/install/gemfile/override_spec.rb index 7a7f8078a8..410bf96737 100644 --- a/spec/bundler/install/gemfile/override_spec.rb +++ b/spec/bundler/install/gemfile/override_spec.rb @@ -129,4 +129,16 @@ RSpec.describe "override DSL" do expect(the_bundle).to include_gems "myrack 1.0.0", "myrack_middleware 1.0" end end + + context "lockfile contents" do + it "does not record the override directive in Gemfile.lock" do + install_gemfile <<-G + source "https://gem.repo1" + override "myrack", version: "= 0.9.1" + gem "myrack" + G + + expect(lockfile).not_to match(/override/i) + end + end end |
