diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-14 02:24:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-14 02:24:47 +0000 |
commit | a68c69d196b76d42cf74aba497a37cbf1be87bf9 (patch) | |
tree | 20b08e85fb5aab5b54802ab44f9e348c6ff434bb | |
parent | db318509d5546696e65e6241197cdacbe442c071 (diff) |
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
-rw-r--r-- | object.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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)"); |