From d28368d27f6ee8e82dc293f10cbbcbe7f07fa9d1 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 16 Dec 2024 11:02:12 -0500 Subject: Move special constant check in rb_gc_location to gc.c --- gc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gc.c') diff --git a/gc.c b/gc.c index c5277ee2c8..dfef384eb3 100644 --- a/gc.c +++ b/gc.c @@ -3150,6 +3150,10 @@ check_id_table_move(VALUE value, void *data) VALUE rb_gc_location(VALUE value) { + if (SPECIAL_CONST_P(value)) { + return value; + } + return rb_gc_impl_location(rb_gc_get_objspace(), value); } -- cgit v1.2.3