Copy mrb_float values from pool when MRB_WORD_BOXING; ref #3396

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-01-25 11:09:15 +09:00
parent 51d7a69ab0
commit ac88f85a9e
+8
View File
@@ -859,7 +859,15 @@ RETRY_TRY_BLOCK:
CASE(OP_LOADL) {
/* A Bx R(A) := Pool(Bx) */
#ifdef MRB_WORD_BOXING
mrb_value val = pool[GETARG_Bx(i)];
if (mrb_float_p(val)) {
val = mrb_float_value(mrb, mrb_float(val));
}
regs[GETARG_A(i)] = val;
#else
regs[GETARG_A(i)] = pool[GETARG_Bx(i)];
#endif
NEXT;
}