diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-02-03 12:48:37 -0800 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-02-03 12:48:37 -0800 |
commit | 33d6e92e0c6eaf1308ce7108e653c53bb5fb106c (patch) | |
tree | 04f5f2272c5e52daba10fa11c396fe1ed90b4171 /variable.c | |
parent | 6b4814083b3b7d4b5aadc6758a9cdd9ca4619ff1 (diff) | |
download | ruby-33d6e92e0c6eaf1308ce7108e653c53bb5fb106c.tar.gz |
Revert "Don't pin `val` passed in to `rb_define_const`."
I think this is breaking something
This reverts commit 1be84e53d76cff30ae371f0b397336dee934499d.
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |