Refactor rb_define_class_variable function (#4492)

This commit is contained in:
S.H 2021-06-01 16:32:24 +09:00 committed by GitHub
parent e1b03b0c2b
commit 1055b37ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2021-06-01 16:32:44 +09:00
Merged-By: k0kubun <takashikkbn@gmail.com>

View File

@ -3412,8 +3412,7 @@ rb_cv_get(VALUE klass, const char *name)
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