diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-08-09 16:27:43 -0700 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-08-12 12:34:09 -0400 |
commit | 6749682f8225b50bc91a45af0f27f20ff68d473c (patch) | |
tree | 000e972f5bfceea64319dbeb272ae152b1e47a25 | |
parent | 76a928bac2f37e7aa631a6b6dd5320920d6c1b42 (diff) | |
download | ruby-6749682f8225b50bc91a45af0f27f20ff68d473c.tar.gz |
also unpin `final` on weak maps
-rw-r--r-- | gc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -10135,6 +10135,7 @@ wmap_compact(void *ptr) struct weakmap *w = ptr; if (w->wmap2obj) rb_gc_update_tbl_refs(w->wmap2obj); if (w->obj2wmap) rb_gc_update_tbl_refs(w->obj2wmap); + w->final = rb_gc_location(w->final); } static void @@ -10144,7 +10145,7 @@ wmap_mark(void *ptr) #if WMAP_DELETE_DEAD_OBJECT_IN_MARK if (w->obj2wmap) st_foreach(w->obj2wmap, wmap_mark_map, (st_data_t)&rb_objspace); #endif - rb_gc_mark(w->final); + rb_gc_mark_no_pin(w->final); } static int |