summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-06 07:03:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-06 07:03:20 +0000
commit49e8bdf7a352eda0c5cc1403801c2624460ed69e (patch)
tree2e50ec0fb07ae3533d26ae9a2d67d6c701114e9c /parse.y
parent6e6b863d53253c67b4b6d013a8f26b77f1ac354a (diff)
* parse.y (stmt): END in method should cause warning.
[ruby-dev:21519] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 7f70de0481..7005602010 100644
--- a/parse.y
+++ b/parse.y
@@ -472,8 +472,8 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem
}
| klEND '{' compstmt '}'
{
- if (compile_for_eval && (in_def || in_single)) {
- yyerror("END in method; use at_exit");
+ if (in_def || in_single) {
+ rb_warn("END in method; use at_exit");
}
$$ = NEW_ITER(0, NEW_POSTEXE(), $3);