marshal.c: fix instance variable load odrder
* marshal.c (r_symreal): fix instance variable load odrder, its name must be read before its value. the order of function call arguments is not stable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
aa3b506270
commit
2d1e5bcefc
@ -1315,7 +1315,8 @@ r_symreal(struct load_arg *arg, int ivar)
|
|||||||
if (ivar) {
|
if (ivar) {
|
||||||
long num = r_long(arg);
|
long num = r_long(arg);
|
||||||
while (num-- > 0) {
|
while (num-- > 0) {
|
||||||
idx = sym2encidx(r_symbol(arg), r_object(arg));
|
sym = r_symbol(arg);
|
||||||
|
idx = sym2encidx(sym, r_object(arg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (idx > 0) rb_enc_associate_index(s, idx);
|
if (idx > 0) rb_enc_associate_index(s, idx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user