Actions
Bug #22529
closedArray#fill should respect frozenness from yields
Bug #22529:
Array#fill should respect frozenness from yields
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 4.0.9 (2026-10-23 revision 3e93b23afc) +PRISM [arm64-darwin25]
Updated by tenderlovemaking (Aaron Patterson) 9 days ago
I sent a patch here: https://github.com/ruby/ruby/pull/19821
Updated by tenderlovemaking (Aaron Patterson) 9 days ago
- Status changed from Open to Closed
Applied in changeset git|dd0ff240523781569ade1d438e16df2d381070aa.
Check array modifiability in Array#fill (#19821)
Array#fill yields to a block and the block code may freeze the array.
We need to check when iterating otherwise we'll end up mutating a frozen
array
[Bug #22529]
Updated by jhawthorn (John Hawthorn) 9 days ago
- Backport changed from 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN to 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: REQUIRED
4.0 backport: https://github.com/ruby/ruby/pull/19829
Updated by jhawthorn (John Hawthorn) 6 days ago
- Backport changed from 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: REQUIRED to 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: DONE
Actions