6

Github Don't pin `val` passed in to `rb_define_const`. · ruby/ruby@1be84e5 · Git...

 3 years ago
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.
neoserver,ios ssh client

Don't pin `val` passed in to `rb_define_const`. · ruby/ruby@1be84e5 · GitHubPermalink

Browse files

Don't pin `val` passed in to `rb_define_const`.

The caller should be responsible for holding a pinned reference (if they
need that)

tenderlove

committed 10 days ago

1 parent 71c7463 commit 1be84e53d76cff30ae371f0b397336dee934499d
Showing with 0 additions and 1 deletion.

@@ -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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK