зеркало из https://github.com/github/ruby.git
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:
Родитель
6b4814083b
Коммит
33d6e92e0c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче