1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Revert "Don't pin val passed in to rb_define_const."

I think this is breaking something

This reverts commit 1be84e53d7.
This commit is contained in:
Aaron Patterson 2021-02-03 12:48:37 -08:00
parent 6b4814083b
commit 33d6e92e0c
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6

View file

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