diff --git a/ChangeLog b/ChangeLog index 59459ffa19..1d5ae228ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Jul 31 11:48:03 2009 Nobuyoshi Nakada + + * compile.c (iseq_compile_each): used more appropriate construct. + Fri Jul 31 10:54:08 2009 Nobuyoshi Nakada * parse.y (literal_concat_gen): reduced unnecessary node at string diff --git a/compile.c b/compile.c index 1c5dba5231..f01b287be8 100644 --- a/compile.c +++ b/compile.c @@ -4188,10 +4188,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) case NODE_RETURN:{ rb_iseq_t *is = iseq; - while (is) { + if (is) { if (is->type == ISEQ_TYPE_TOP || is->type == ISEQ_TYPE_CLASS) { COMPILE_ERROR((ERROR_ARGS "Invalid return")); - break; } else { LABEL *splabel = 0; @@ -4219,7 +4218,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) ADD_INSN(ret, nd_line(node), pop); } } - break; } } break;