Skip to content

Commit 574127b

Browse files
byroottagomoris
authored andcommitted
Add missing gc_mark in autoload_const_mark
If we're referencing the namespace object we have to mark it.
1 parent ae2d537 commit 574127b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

variable.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2864,6 +2864,7 @@ autoload_const_compact(void *ptr)
28642864
ac->autoload_data_value = rb_gc_location(ac->autoload_data_value);
28652865
ac->value = rb_gc_location(ac->value);
28662866
ac->file = rb_gc_location(ac->file);
2867+
ac->namespace = rb_gc_location(ac->namespace);
28672868
}
28682869

28692870
static void
@@ -2875,6 +2876,7 @@ autoload_const_mark(void *ptr)
28752876
rb_gc_mark_movable(ac->autoload_data_value);
28762877
rb_gc_mark_movable(ac->value);
28772878
rb_gc_mark_movable(ac->file);
2879+
rb_gc_mark_movable(ac->namespace);
28782880
}
28792881

28802882
static size_t

0 commit comments

Comments
 (0)