variable.c: no intermediate IDs
* variable.c (rb_set_class_path_string, rb_set_class_path): get rid of creating intermediate IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d77f4934f8
commit
6fefba37d0
@ -336,7 +336,7 @@ rb_set_class_path_string(VALUE klass, VALUE under, VALUE name)
|
||||
OBJ_FREEZE(str);
|
||||
if (!permanent) {
|
||||
pathid = tmp_classpath;
|
||||
rb_ivar_set(klass, classid, ID2SYM(rb_intern_str(name)));
|
||||
rb_ivar_set(klass, classid, rb_str_intern(name));
|
||||
}
|
||||
}
|
||||
rb_ivar_set(klass, pathid, str);
|
||||
@ -358,7 +358,7 @@ rb_set_class_path(VALUE klass, VALUE under, const char *name)
|
||||
rb_str_cat2(str, name);
|
||||
if (!permanent) {
|
||||
pathid = tmp_classpath;
|
||||
rb_ivar_set(klass, classid, ID2SYM(rb_intern(name)));
|
||||
rb_ivar_set(klass, classid, rb_str_intern(rb_str_new_cstr(name)));
|
||||
}
|
||||
}
|
||||
OBJ_FREEZE(str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user