ruby-changes:32114
From: nobu <ko1@a...>
Date: Sat, 14 Dec 2013 11:24:50 +0900 (JST)
Subject: [ruby-changes:32114] nobu:r44193 (trunk): object.c: remove unnecessary assignment
nobu 2013-12-14 11:24:47 +0900 (Sat, 14 Dec 2013) New Revision: 44193 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44193 Log: object.c: remove unnecessary assignment * object.c (rb_mod_const_get): remove unnecessary assignment and set path together. Modified files: trunk/object.c Index: object.c =================================================================== --- object.c (revision 44192) +++ object.c (revision 44193) @@ -2089,10 +2089,8 @@ rb_mod_const_get(int argc, VALUE *argv, https://github.com/ruby/ruby/blob/trunk/object.c#L2089 return RTEST(recur) ? rb_const_get(mod, id) : rb_const_get_at(mod, id); } - name = StringValue(name); - + path = StringValuePtr(name); enc = rb_enc_get(name); - path = RSTRING_PTR(name); if (!rb_enc_asciicompat(enc)) { rb_raise(rb_eArgError, "invalid class path encoding (non ASCII)"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/