From 11b6696ce24921f03236631905b123ffce12321c Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 13 Dec 2017 08:43:15 +0900 Subject: Retrieve operands at the beginning of `OP_SCLASS`. --- src/vm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vm.c b/src/vm.c index 45e05268c..464e9042d 100644 --- a/src/vm.c +++ b/src/vm.c @@ -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; } -- cgit v1.2.3