summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index c4fa08e35b..786b055079 100644
--- a/compile.c
+++ b/compile.c
@@ -4768,10 +4768,10 @@ compile_if(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int
node_body ? nd_last_column(node_body) : last_column,
type == NODE_IF ? "then" : "else",
branches);
+ end_label = NEW_LABEL(line);
+ ADD_INSNL(then_seq, line, jump, end_label);
}
ADD_SEQ(ret, then_seq);
- end_label = NEW_LABEL(line);
- ADD_INSNL(ret, line, jump, end_label);
}
if (else_label->refcnt) {