ruby-changes:66387
From: S.H <ko1@a...>
Date: Tue, 1 Jun 2021 16:32:39 +0900 (JST)
Subject: [ruby-changes:66387] 1055b37ef5 (master): Refactor rb_define_class_variable function (#4492)
https://git.ruby-lang.org/ruby.git/commit/?id=1055b37ef5 From 1055b37ef56ff786b5dfd407c23dcf585eb86748 Mon Sep 17 00:00:00 2001 From: "S.H" <gamelinks007@g...> Date: Tue, 1 Jun 2021 16:32:24 +0900 Subject: Refactor rb_define_class_variable function (#4492) --- variable.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/variable.c b/variable.c index 85ff35b..6d03843 100644 --- a/variable.c +++ b/variable.c @@ -3412,8 +3412,7 @@ rb_cv_get(VALUE klass, const char *name) https://github.com/ruby/ruby/blob/trunk/variable.c#L3412 void rb_define_class_variable(VALUE klass, const char *name, VALUE val) { - ID id = cv_intern(klass, name); - rb_cvar_set(klass, id, val); + rb_cv_set(klass, name, val); } static int -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/