aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index 44f56ae411..b14635f034 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1315,7 +1315,8 @@ r_symreal(struct load_arg *arg, int ivar)
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);