We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c251f7 commit 1da540aCopy full SHA for 1da540a
1 file changed
gc.c
@@ -1278,7 +1278,9 @@ rb_gc_handle_weak_references(VALUE obj)
1278
GC_ASSERT(imemo_type(obj) == imemo_callcache);
1279
1280
struct rb_callcache *cc = (struct rb_callcache *)obj;
1281
- if (!rb_gc_handle_weak_references_alive_p(cc->klass)) {
+ if (cc->klass != Qundef &&
1282
+ (!rb_gc_handle_weak_references_alive_p(cc->klass) ||
1283
+ !rb_gc_handle_weak_references_alive_p((VALUE)cc->cme_))) {
1284
vm_cc_invalidate(cc);
1285
}
1286
0 commit comments