summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-05-11 09:59:23 +0900
committerGitHub <[email protected]>2020-05-11 09:59:23 +0900
commit846af371c083323a86e670755740be7d7698c9b5 (patch)
treee61812f395aee06ba10801e88ce8a8188437c75f
parent38b4483f9d09e5c5cfcff300c91ea397adb55049 (diff)
parentbd60ad98eb3ed48fc7bbe52ad5b879189c582bbd (diff)
downloadmruby-846af371c083323a86e670755740be7d7698c9b5.tar.gz
mruby-846af371c083323a86e670755740be7d7698c9b5.zip
Merge pull request #4998 from dearblue/special-vars
Get an irep symbol if it's `OP_GETSV` or `OP_SETSV`
-rw-r--r--src/vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vm.c b/src/vm.c
index 26da5831e..7bb153910 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1089,13 +1089,13 @@ RETRY_TRY_BLOCK:
}
CASE(OP_GETSV, BB) {
- mrb_value val = mrb_vm_special_get(mrb, b);
+ mrb_value val = mrb_vm_special_get(mrb, syms[b]);
regs[a] = val;
NEXT;
}
CASE(OP_SETSV, BB) {
- mrb_vm_special_set(mrb, b, regs[a]);
+ mrb_vm_special_set(mrb, syms[b], regs[a]);
NEXT;
}