diff --git a/gc.c b/gc.c index d96124003f44fe..3134c5a8cdf151 100644 --- a/gc.c +++ b/gc.c @@ -10271,12 +10271,13 @@ update_cvc_tbl(rb_objspace_t *objspace, VALUE klass) static enum rb_id_table_iterator_result mark_cvc_tbl_i(VALUE cvc_entry, void *data) { + rb_objspace_t *objspace = (rb_objspace_t *)data; struct rb_cvar_class_tbl_entry *entry; entry = (struct rb_cvar_class_tbl_entry *)cvc_entry; RUBY_ASSERT(entry->cref == 0 || (BUILTIN_TYPE((VALUE)entry->cref) == T_IMEMO && IMEMO_TYPE_P(entry->cref, imemo_cref))); - rb_gc_mark((VALUE) entry->cref); + gc_mark(objspace, (VALUE) entry->cref); return ID_TABLE_CONTINUE; }