From 04176dc21fb74c26a12895319a86eb2c3b138f90 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 16 Aug 2007 18:12:02 +0000 Subject: * compile.c (iseq_compile_each): fix thorw insn option of next. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 6f655c3bd4..e6db61718a 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; -- cgit v1.2.3