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
This commit is contained in:
parent
db318509d5
commit
a68c69d196
4
object.c
4
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);
|
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);
|
enc = rb_enc_get(name);
|
||||||
path = RSTRING_PTR(name);
|
|
||||||
|
|
||||||
if (!rb_enc_asciicompat(enc)) {
|
if (!rb_enc_asciicompat(enc)) {
|
||||||
rb_raise(rb_eArgError, "invalid class path encoding (non ASCII)");
|
rb_raise(rb_eArgError, "invalid class path encoding (non ASCII)");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user