fix correct stack postion for headless case #676

Merged
merged 1 commit into from Dec 28, 2012
View
4 src/codegen.c
@@ -1205,7 +1205,9 @@ codegen(codegen_scope *s, node *tree, int val)
pop();
genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern(s->mrb, "===")), 1));
}
- pop();
+ else
+ pop();
+
tmp = new_label(s);
genop(s, MKOP_AsBx(OP_JMPIF, cursp(), pos2));
pos2 = tmp;