diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-27 04:26:21 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-27 04:26:21 +0000 |
commit | af181db7846b3ca38b443bdf7d65e6d26f87da6a (patch) | |
tree | 9c05af34210f699bd1425b5ff6f5b2e39919f2af /parse.y | |
parent | 35e4d1319b86f9a2899a0fc1bb6ffafd7f26840e (diff) | |
download | ruby-af181db7846b3ca38b443bdf7d65e6d26f87da6a.tar.gz |
* eval.c (rb_eval): Class#inherited should be called after the
execution of the class body.
* parse.y (primary): remove "return outside of method" check at
compile time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -556,8 +556,6 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem expr : kRETURN call_args { - if (!compile_for_eval && !in_def && !in_single) - yyerror("return appeared outside of method"); $$ = NEW_RETURN(ret_args($2)); } | kBREAK call_args @@ -1339,8 +1337,6 @@ primary : literal } | kRETURN { - if (!compile_for_eval && !in_def && !in_single) - yyerror("return appeared outside of method"); $$ = NEW_RETURN(0); } | kYIELD '(' call_args ')' |