summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index 7a6bff985..f225bf47b 100644
--- a/eval.c
+++ b/eval.c
@@ -2084,10 +2084,12 @@ rb_eval(self, node)
resq = resq->nd_head; /* next rescue */
}
}
- if (state) JUMP_TAG(state);
- if (node->nd_else) { /* no exception raised, else clause given */
- result = rb_eval(self, node->nd_else);
+ else if (node->nd_else) { /* else clause given */
+ if (!state) { /* no exception raised */
+ result = rb_eval(self, node->nd_else);
+ }
}
+ if (state) JUMP_TAG(state);
}
break;