summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-27 14:47:02 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-27 14:47:02 +0000
commitf3e1c29b2414510b4622336bed790960c0762057 (patch)
treea1743f59b7c04cab9a63793ed1043f412398447e /parse.y
parentd74ccf8fc1cc4ce67d0c498a3c963f08ba4b8530 (diff)
* parse.y (opt_bv_decl): allow newline at the end. [ruby-dev:45292]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y11
1 files changed, 7 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index e47dac4304..bfddcfb34a 100644
--- a/parse.y
+++ b/parse.y
@@ -3727,13 +3727,16 @@ block_param_def : '|' opt_bv_decl '|'
;
-opt_bv_decl : none
- | ';' bv_decls
+opt_bv_decl : opt_nl
+ {
+ $$ = 0;
+ }
+ | opt_nl ';' bv_decls opt_nl
{
/*%%%*/
$$ = 0;
/*%
- $$ = $2;
+ $$ = $3;
%*/
}
;
@@ -3788,7 +3791,7 @@ lambda : {
}
;
-f_larglist : '(' f_args opt_bv_decl rparen
+f_larglist : '(' f_args opt_bv_decl ')'
{
/*%%%*/
$$ = $2;