diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2023-02-01 10:18:34 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-02-02 09:17:20 -0500 |
| commit | 84be7a40893e4bccf836835a9ace0ff8cf4f5cc8 (patch) | |
| tree | daae07423fab03cf295137e60305701aad0f88f8 /variable.c | |
| parent | 3e5a77f1ae73f4a6bf7b2b868be674ab8c714c7a (diff) | |
Keep shared arrays WB protected
Sharing an array will cause it to be WB unprotected due to the use
of `RARRAY_PTR`. We don't need to WB unprotect the array because we're
not writing to the buffer of the array.
The following script demonstrates this issue:
```
ary = [1] * 1000
shared = ary[10..20]
puts ObjectSpace.dump(ary)
```
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7224
Diffstat (limited to 'variable.c')
0 files changed, 0 insertions, 0 deletions
