diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2023-11-17 14:05:37 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-11-17 13:08:43 -0800 |
| commit | 3dd77bc056de19a1cc0ad3fafdb8e49c429dec5a (patch) | |
| tree | bc18b727a2a043d17dc66ffeec1352232bd37745 /test/ruby/test_rubyoptions.rb | |
| parent | 7c99e43c3f050244b06dbd18de4f605ea70d234c (diff) | |
Fix corruption when out of shape during ivar remove
Reproduction script:
```
o = Object.new
10.times { |i| o.instance_variable_set(:"@a#{i}", i) }
i = 0
a = Object.new
while RubyVM::Shape.shapes_available > 2
a.instance_variable_set(:"@i#{i}", 1)
i += 1
end
o.remove_instance_variable(:@a0)
puts o.instance_variable_get(:@a1)
```
Before this patch, it would incorrectly output `2` and now it correctly
outputs `1`.
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
0 files changed, 0 insertions, 0 deletions
