ruby-changes:34908
From: nobu <ko1@a...>
Date: Tue, 29 Jul 2014 05:36:58 +0900 (JST)
Subject: [ruby-changes:34908] nobu:r46991 (trunk): marshal.c: fix instance variable load odrder
nobu 2014-07-29 05:36:50 +0900 (Tue, 29 Jul 2014) New Revision: 46991 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46991 Log: 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. Modified files: trunk/marshal.c Index: marshal.c =================================================================== --- marshal.c (revision 46990) +++ marshal.c (revision 46991) @@ -1315,7 +1315,8 @@ r_symreal(struct load_arg *arg, int ivar https://github.com/ruby/ruby/blob/trunk/marshal.c#L1315 if (ivar) { long num = r_long(arg); 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/