Github Don't pin `val` passed in to `rb_define_const`. · ruby/ruby@1be84e5 · Git...
source link: https://github.com/ruby/ruby/commit/1be84e53d76cff30ae371f0b397336dee934499d
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Don't pin `val` passed in to `rb_define_const`. · ruby/ruby@1be84e5 · GitHubPermalink
Don't pin `val` passed in to `rb_define_const`.
The caller should be responsible for holding a pinned reference (if they need that)
committed 10 days ago
@@ -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);
}
0 comments
on commit 1be84e5
Please sign in to comment.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK