From a68c69d196b76d42cf74aba497a37cbf1be87bf9 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 14 Dec 2013 02:24:47 +0000 Subject: object.c: remove unnecessary assignment * object.c (rb_mod_const_get): remove unnecessary assignment and set path together. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index b3a1c976db..9c84fe5931 100644 --- a/object.c +++ b/object.c @@ -2089,10 +2089,8 @@ rb_mod_const_get(int argc, VALUE *argv, VALUE mod) 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)"); -- cgit v1.2.3