Skip to content

Conversation

@nevans
Copy link
Collaborator

@nevans nevans commented Dec 17, 2025

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.

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 force-pushed the fix-responses-frozen_dup branch from 1f3de72 to 0041349 Compare December 17, 2025 18:28
@nevans nevans merged commit 96fd33b into master Dec 17, 2025
32 checks passed
@nevans nevans deleted the fix-responses-frozen_dup branch December 17, 2025 18:36
@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

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: responses() without arguments freezes internal arrays, breaking subsequent extract_responses() calls

2 participants