From 574127b0db7ac757ea55cee4e3e61d5a7a5e06c6 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Sun, 11 May 2025 10:42:42 +0200 Subject: [PATCH] Add missing gc_mark in `autoload_const_mark` If we're referencing the namespace object we have to mark it. --- variable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/variable.c b/variable.c index c8be5a3b39..b6f1abdc93 100644 --- a/variable.c +++ b/variable.c @@ -2864,6 +2864,7 @@ autoload_const_compact(void *ptr) ac->autoload_data_value = rb_gc_location(ac->autoload_data_value); ac->value = rb_gc_location(ac->value); ac->file = rb_gc_location(ac->file); + ac->namespace = rb_gc_location(ac->namespace); } static void @@ -2875,6 +2876,7 @@ autoload_const_mark(void *ptr) rb_gc_mark_movable(ac->autoload_data_value); rb_gc_mark_movable(ac->value); rb_gc_mark_movable(ac->file); + rb_gc_mark_movable(ac->namespace); } static size_t