ObjectSpace::WeakMap: fix compaction support
commit548086b34e3dd125edabf5dc1e46b891fad3ea9c
authorJean Boussier <[email protected]>
Tue, 14 Mar 2023 08:12:55 +0000 (14 09:12 +0100)
committerJean Boussier <[email protected]>
Tue, 14 Mar 2023 15:49:23 +0000 (14 16:49 +0100)
tree6c147bc459e5c90e3c7efefc742d699f947c9a15
parentac65ce16e904695ba45888d3fba641d12caf733a
ObjectSpace::WeakMap: fix compaction support

[Bug #19529]

`rb_gc_update_tbl_refs` can't be used on `w->obj2wmap` because it's
not a `VALUE -> VALUE` table, but a `VALUE -> VALUE *` table, so
we need some dedicated iterator.
test/ruby/test_weakmap.rb
weakmap.c