1
0
Fork 0
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:
Aaron Patterson 2021-02-01 10:42:13 -08:00 committed by Aaron Patterson
parent 71c746379d
commit 1be84e53d7
Notes: git 2021-02-04 02:35:50 +09:00

View file

@ -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);
}