1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
matz 2003-10-06 07:03:20 +00:00
parent 6e6b863d53
commit 49e8bdf7a3
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Mon Oct 6 16:02:05 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (stmt): END in method should cause warning.
[ruby-dev:21519]
Mon Oct 6 15:17:23 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* test/ruby/test_iterator.rb (test_block_argument_without_paren):

View file

@ -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);