diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-13 08:43:15 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-13 08:43:15 +0900 |
| commit | 11b6696ce24921f03236631905b123ffce12321c (patch) | |
| tree | 5d37572a1277ca7fc5782da3b3112c1410c9c95f /src | |
| parent | e647b16d1d57525f6eda80fac50c6f242f8fb101 (diff) | |
| download | mruby-11b6696ce24921f03236631905b123ffce12321c.tar.gz mruby-11b6696ce24921f03236631905b123ffce12321c.zip | |
Retrieve operands at the beginning of `OP_SCLASS`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2867,7 +2867,10 @@ RETRY_TRY_BLOCK: CASE(OP_SCLASS) { /* A B R(A) := R(B).singleton_class */ - regs[GETARG_A(i)] = mrb_singleton_class(mrb, regs[GETARG_B(i)]); + int a = GETARG_A(i); + int b = GETARG_B(i); + + regs[a] = mrb_singleton_class(mrb, regs[b]); mrb_gc_arena_restore(mrb, ai); NEXT; } |
