Skip to content

Conversation

@nevans
Copy link
Collaborator

@nevans nevans commented Dec 17, 2025

Backports #587 to v0.5-stable. From that PR:

Now that :frozen_dup is the default behavior for #responses when it's called without any arguments, a critical bug has become apparent: it was not freezing the internal responses arrays directly, rather than copies of them. Freezing these arrays will, of course, lead to further issues.

Ideally, code should be updated to use one of the other forms of #responses, since this form is less efficient and also (intentionally) incompatibile with old code that expects it to return mutable arrays. But this is still a major bug.

Fixes #581 (for 0.5), reported by @yurikoval.

Now that `:frozen_dup` is the default behavior for `#responses` when
it's called without any arguments, a critical bug has become apparent:
it was not freezing the internal responses arrays directly, rather than
copies of them.  Freezing these arrays will, of course, lead to further
issues.

Ideally, code should be updated to use one of the other forms of
`#responses`, since this form is less efficient and also (intentionally)
incompatibile with old code that expects it to return mutable arrays.
But this is still a major bug.

Fixes #581, reported by @yurikoval.
@nevans nevans added the backport This issue or PR is for a stable release branch label Dec 17, 2025
@nevans nevans merged commit 389223d into v0.5-stable Dec 17, 2025
39 checks passed
@nevans nevans deleted the backport-0.5/fix-responses-frozen_dup branch December 17, 2025 18:36
@nevans nevans changed the title 🐛 Fix responses frozen dup (backport to 0.5) 🐛 Fix config.responses_without_block = :frozen_dup (backport to 0.5) Dec 17, 2025
@nevans nevans added the bug Something isn't working label Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This issue or PR is for a stable release branch bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants