Commit 389223d
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 931c094 commit 389223d
2 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3233 | 3233 | | |
3234 | 3234 | | |
3235 | 3235 | | |
3236 | | - | |
| 3236 | + | |
3237 | 3237 | | |
3238 | 3238 | | |
3239 | 3239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| |||
0 commit comments