summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-10-20 09:48:04 +0900
committerYukihiro Matsumoto <[email protected]>2012-10-20 09:48:04 +0900
commit7fe6d00ff54fe5cb746ef9370b91d2251751e21f (patch)
tree3825313af3209a8dbd6282370c8f5e2fcbbdf060 /src
parentf166f63f452d21c55a860d26a57b2f815f5c96f2 (diff)
downloadmruby-7fe6d00ff54fe5cb746ef9370b91d2251751e21f.tar.gz
mruby-7fe6d00ff54fe5cb746ef9370b91d2251751e21f.zip
avoid duplicated OP_RETURN
Diffstat (limited to 'src')
-rw-r--r--src/codegen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 7d10ffce8..1f087b2cd 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -267,6 +267,8 @@ genop_peep(codegen_scope *s, mrb_code i, int val)
break;
case OP_RETURN:
switch (c0) {
+ case OP_RETURN:
+ return;
case OP_MOVE:
s->iseq[s->pc-1] = MKOP_AB(OP_RETURN, GETARG_B(i0), OP_R_NORMAL);
return;