From e8a71e64a15c46388e1abf293fa81df3ebfc5643 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 22 Oct 2008 06:03:12 +0000 Subject: * parse.y (f_larglist): should not allow semicolon separated local variable declarations if formal argument list is not surrounded by parentheses, mostly because semicolon outside of parentheses appears to terminate the expression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ parse.y | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e75cb5549f..1a00d98796 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Oct 22 14:59:30 2008 Yukihiro Matsumoto + + * parse.y (f_larglist): should not allow semicolon separated local + variable declarations if formal argument list is not surrounded + by parentheses, mostly because semicolon outside of parentheses + appears to terminate the expression. + Wed Oct 22 14:52:17 2008 Yukihiro Matsumoto * string.c (rb_external_str_new_with_enc): no implicit strlen call. diff --git a/parse.y b/parse.y index 54e0c6ab8a..3f85c07b09 100644 --- a/parse.y +++ b/parse.y @@ -3453,7 +3453,7 @@ f_larglist : '(' f_args opt_bv_decl rparen $$ = dispatch1(paren, $2); %*/ } - | f_args opt_bv_decl + | f_args { /*%%%*/ $$ = NEW_LAMBDA($1); -- cgit v1.2.3