summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-30 00:21:14 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-30 00:21:14 +0000
commit13ac4447f6a11498d84f668c636fa2b8eecb5d22 (patch)
tree5b1d006f36a07e0200a12c26309b6659639ec997 /eval.c
parente377a12bff690512a568b93c018ec42961ac2a48 (diff)
* eval.c (rb_eval): while/until should not capture break unless
they are destination of the break. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;
}