Fix bug for removed weak references
rb_darray_foreach gives a pointer to the entry, so we need to deference it to read the value.
This commit is contained in:
parent
26a05c4217
commit
7979c009a7
2
gc.c
2
gc.c
@ -8281,7 +8281,7 @@ gc_update_weak_references(rb_objspace_t *objspace)
|
|||||||
size_t retained_weak_references_count = 0;
|
size_t retained_weak_references_count = 0;
|
||||||
VALUE **ptr_ptr;
|
VALUE **ptr_ptr;
|
||||||
rb_darray_foreach(objspace->weak_references, i, ptr_ptr) {
|
rb_darray_foreach(objspace->weak_references, i, ptr_ptr) {
|
||||||
if (!ptr_ptr) continue;
|
if (!*ptr_ptr) continue;
|
||||||
|
|
||||||
VALUE obj = **ptr_ptr;
|
VALUE obj = **ptr_ptr;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user