summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--parse.y4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b6d13b674c..b8ac7debdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
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);