summaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-16 18:12:02 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-16 18:12:02 +0000
commitc7441fc1de3cc8590311601e78a78cbe117b6491 (patch)
treee1f9aae666cb948b001c629707762a32f75e553b /compile.c
parent67d00af5b6fb39189b32d7712f53326ab032040a (diff)
downloadruby-c7441fc1de3cc8590311601e78a78cbe117b6491.tar.gz
ruby-c7441fc1de3cc8590311601e78a78cbe117b6491.tar.xz
ruby-c7441fc1de3cc8590311601e78a78cbe117b6491.zip
* compile.c (iseq_compile_each): fix thorw insn option of next.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 6f655c3bd..e6db61718 100644
--- a/compile.c
+++ b/compile.c
@@ -2961,11 +2961,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ip = iseq;
while (ip) {
level = 0x8000;
- if (ip->type == ISEQ_TYPE_BLOCK) {
- level |= 0x4000;
+ if (ip->compile_data->redo_label != 0) {
+ /* while loop */
break;
}
- else if (ip->compile_data->redo_label != 0) {
+ else if (ip->type == ISEQ_TYPE_BLOCK) {
+ level |= 0x4000;
break;
}
ip = ip->parent_iseq;