mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Don't pin val
passed in to rb_define_const
.
The caller should be responsible for holding a pinned reference (if they need that)
This commit is contained in:
parent
71c746379d
commit
1be84e53d7
Notes:
git
2021-02-04 02:35:50 +09:00
1 changed files with 0 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue