Skip to content

Commit

Permalink
cvc table entries can move
Browse files Browse the repository at this point in the history
  • Loading branch information
eightbitraptor committed Jul 20, 2023
1 parent 62cb739 commit dd8372b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gc.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit dd8372b

Please sign in to comment.