summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index 3ee0b4d5da..5c2ff1790f 100644
--- a/eval.c
+++ b/eval.c
@@ -2650,8 +2650,11 @@ rb_eval(self, n)
state = 0;
goto while_next;
case TAG_BREAK:
- state = 0;
- result = prot_tag->retval;
+ if (TAG_DST()) {
+ state = 0;
+ result = prot_tag->retval;
+ }
+ /* fall through */
default:
break;
}
@@ -2682,8 +2685,11 @@ rb_eval(self, n)
state = 0;
goto until_next;
case TAG_BREAK:
- state = 0;
- result = prot_tag->retval;
+ if (TAG_DST()) {
+ state = 0;
+ result = prot_tag->retval;
+ }
+ /* fall through */
default:
break;
}