Commit 1e67a56
committed
🐛 Fix
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.#responses() freezing internal arrays1 parent 1608a0a commit 1e67a56
2 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2691 | 2691 | | |
2692 | 2692 | | |
2693 | 2693 | | |
2694 | | - | |
| 2694 | + | |
2695 | 2695 | | |
2696 | 2696 | | |
2697 | 2697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
176 | 180 | | |
177 | 181 | | |
178 | 182 | | |
| |||
0 commit comments