diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-02-01 10:42:13 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2021-02-03 09:35:15 -0800 |
commit | 1be84e53d76cff30ae371f0b397336dee934499d (patch) | |
tree | 7ab2959db53ee2b94cd2313185091b2866d64c5f /variable.c | |
parent | 71c746379d5872e250d90ae45c585760afaf9516 (diff) |
Don't pin `val` passed in to `rb_define_const`.
The caller should be responsible for holding a pinned reference (if they
need that)
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4144
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 92d7d11eab..ff4f7964a7 100644 --- a/variable.c +++ b/variable.c @@ -3154,7 +3154,6 @@ 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); } |