Skip to content

Keep cookie jar storage separate from caller arrays - #365

Open
OskarEichler wants to merge 2 commits into
rack:mainfrom
OskarEichler:codex/own-cookie-jar-array
Open

Keep cookie jar storage separate from caller arrays#365
OskarEichler wants to merge 2 commits into
rack:mainfrom
OskarEichler:codex/own-cookie-jar-array

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Give CookieJar its own sorted array instead of sorting and retaining caller-owned storage.

Reproduction

require "rack/test"
p Rack::Test::CookieJar.new([].freeze).to_hash
# before: FrozenError; after: {}

Verification

  • Based on main c9efe33c68112ed207d8ef9f90a28ecd95a727bf; Ruby 4.0.6 commands run through rbenv.
  • Existing suite: 292 runs, zero failures/errors/skips, with Rack 3.2.7 and 2.2.24.
  • 160 focused assertions cover original ordering, frozen input, later jar mutations and later caller mutations. This is separate from fix/cookie jar delete #356, whose rejected symbol-conversion proposal is not included.
  • History.md updated. Source/History-only patch: no test files added or changed under the consuming repository's no-test-change policy; the executable reproduction is above.
  • No full Ruby/JRuby/platform matrix claim; existing remote CI remains the matrix check.

Breaking changes / limitations

No cookie matching/protocol changes. The caller array is no longer sorted or modified by later jar operations; applications relying on that undocumented side effect will observe a change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant