summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-03-11 16:32:29 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-03-11 16:32:29 +0900
commit000c68da97ec0bfbd93e3969a2eef21081569a72 (patch)
treee7233e2db7ca4d0c4a38a3717c20c07f2bcd1ea7 /mrbgems/mruby-compiler
parent4ab70294ea01cbaf6bdbfbea5bbd854f6661cfd8 (diff)
downloadmruby-000c68da97ec0bfbd93e3969a2eef21081569a72.tar.gz
mruby-000c68da97ec0bfbd93e3969a2eef21081569a72.zip
OP_RETRUN to take B as matching exception; ref #3487
Diffstat (limited to 'mrbgems/mruby-compiler')
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c
index c53abde7f..780a60ea2 100644
--- a/mrbgems/mruby-compiler/core/codegen.c
+++ b/mrbgems/mruby-compiler/core/codegen.c
@@ -1294,7 +1294,7 @@ codegen(codegen_scope *s, node *tree, int val)
node *n2 = tree->car;
int exc = cursp();
- genop(s, MKOP_A(OP_RESCUE, exc));
+ genop(s, MKOP_AB(OP_RESCUE, exc, 0));
push();
while (n2) {
node *n3 = n2->car;
@@ -1788,7 +1788,7 @@ codegen(codegen_scope *s, node *tree, int val)
genop(s, MKOP_A(OP_POPERR, 1));
noexc = genop(s, MKOP_Bx(OP_JMP, 0));
dispatch(s, onerr);
- genop(s, MKOP_A(OP_RESCUE, exc));
+ genop(s, MKOP_AB(OP_RESCUE, exc, 0));
genop(s, MKOP_A(OP_LOADF, exc));
dispatch(s, noexc);
loop_pop(s, NOVAL);