summaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-31 02:48:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-31 02:48:10 +0000
commit63634d77726beaa22d630b65a8acfa50c318b643 (patch)
tree4bca920a332eae94246df880a6d5abdbc6b9e793 /compile.c
parentd766ff977c0a465309c54c2d2466d0fe3031446a (diff)
downloadruby-63634d77726beaa22d630b65a8acfa50c318b643.tar.gz
ruby-63634d77726beaa22d630b65a8acfa50c318b643.tar.xz
ruby-63634d77726beaa22d630b65a8acfa50c318b643.zip
* compile.c (iseq_compile_each): used more appropriate construct.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 1c5dba523..f01b287be 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;