From 33d6e92e0c6eaf1308ce7108e653c53bb5fb106c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 3 Feb 2021 12:48:37 -0800 Subject: [PATCH] Revert "Don't pin `val` passed in to `rb_define_const`." I think this is breaking something This reverts commit 1be84e53d76cff30ae371f0b397336dee934499d. --- variable.c | 1 + 1 file changed, 1 insertion(+) diff --git a/variable.c b/variable.c index ff4f7964a7..92d7d11eab 100644 --- a/variable.c +++ b/variable.c @@ -3154,6 +3154,7 @@ rb_define_const(VALUE klass, const char *name, VALUE val) if (!rb_is_const_id(id)) { rb_warn("rb_define_const: invalid name `%s' for constant", name); } + rb_gc_register_mark_object(val); rb_const_set(klass, id, val); }