ruby-changes:65131
From: Aaron <ko1@a...>
Date: Thu, 4 Feb 2021 02:35:37 +0900 (JST)
Subject: [ruby-changes:65131] 1be84e53d7 (master): Don't pin `val` passed in to `rb_define_const`.
https://git.ruby-lang.org/ruby.git/commit/?id=1be84e53d7 From 1be84e53d76cff30ae371f0b397336dee934499d Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Mon, 1 Feb 2021 10:42:13 -0800 Subject: Don't pin `val` passed in to `rb_define_const`. The caller should be responsible for holding a pinned reference (if they need that) --- variable.c | 1 - 1 file changed, 1 deletion(-) diff --git a/variable.c b/variable.c index 92d7d11..ff4f796 100644 --- a/variable.c +++ b/variable.c @@ -3154,7 +3154,6 @@ rb_define_const(VALUE klass, const char *name, VALUE val) https://github.com/ruby/ruby/blob/trunk/variable.c#L3154 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); } -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/