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:
parent
6b4814083b
commit
33d6e92e0c
1 changed files with 1 additions and 0 deletions
|
@ -3154,6 +3154,7 @@ rb_define_const(VALUE klass, const char *name, VALUE val)
|
||||||
if (!rb_is_const_id(id)) {
|
if (!rb_is_const_id(id)) {
|
||||||
rb_warn("rb_define_const: invalid name `%s' for constant", name);
|
rb_warn("rb_define_const: invalid name `%s' for constant", name);
|
||||||
}
|
}
|
||||||
|
rb_gc_register_mark_object(val);
|
||||||
rb_const_set(klass, id, val);
|
rb_const_set(klass, id, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue