summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-13 22:01:33 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-13 22:01:33 (GMT)
commit6fefba37d0093d1d569c7da87e6e3898ebdd20f8 (patch)
tree6b7e8ecfbca295d0f10a8c61b78b72427d625a32 /variable.c
parentd77f4934f8ede19d8a97d4bc748c92e9b8883133 (diff)
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
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/variable.c b/variable.c
index d0695a2..c835350 100644
--- a/variable.c
+++ b/variable.c
@@ -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);