ruby-changes:38407
From: nobu <ko1@a...>
Date: Thu, 14 May 2015 07:01:54 +0900 (JST)
Subject: [ruby-changes:38407] nobu:r50488 (trunk): variable.c: no intermediate IDs
nobu 2015-05-14 07:01:33 +0900 (Thu, 14 May 2015) New Revision: 50488 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50488 Log: variable.c: no intermediate IDs * variable.c (rb_set_class_path_string, rb_set_class_path): get rid of creating intermediate IDs. Modified files: trunk/variable.c Index: variable.c =================================================================== --- variable.c (revision 50487) +++ variable.c (revision 50488) @@ -336,7 +336,7 @@ rb_set_class_path_string(VALUE klass, VA https://github.com/ruby/ruby/blob/trunk/variable.c#L336 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 und https://github.com/ruby/ruby/blob/trunk/variable.c#L358 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/