Permalink
Browse files

Copy mrb_float values from pool when MRB_WORD_BOXING; ref #3396

  • Loading branch information...
matz committed Jan 25, 2017
1 parent 51d7a69 commit ac88f85a9eb0d03707fc382cbaa442da146d9203
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/vm.c
View
@@ -859,7 +859,15 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
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;
}

0 comments on commit ac88f85

Please sign in to comment.