diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-01-25 11:09:15 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-01-25 11:09:15 +0900 |
| commit | ac88f85a9eb0d03707fc382cbaa442da146d9203 (patch) | |
| tree | 6d155bb6cbb8ee06a2d50ef3c6d8cd956ed09b35 | |
| parent | 51d7a69ab04d1e58618c419543744783de0a9670 (diff) | |
| download | mruby-ac88f85a9eb0d03707fc382cbaa442da146d9203.tar.gz mruby-ac88f85a9eb0d03707fc382cbaa442da146d9203.zip | |
Copy mrb_float values from pool when MRB_WORD_BOXING; ref #3396
| -rw-r--r-- | src/vm.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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; } |
