summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-04-21 14:58:26 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-04-21 14:58:26 +0900
commit8694654fd4245a9cd2946759a97e6766b52983c9 (patch)
treed115d8ec61cfe246c3e68aaf5e8384c0dc495d29 /src
parent6ec04a4e782589266105fdaef6b61bd98e0d5851 (diff)
parentac6747a9c52e22b5ceee81646083df68a33d3442 (diff)
downloadmruby-8694654fd4245a9cd2946759a97e6766b52983c9.tar.gz
mruby-8694654fd4245a9cd2946759a97e6766b52983c9.zip
Merge pull request #2099 from nobu/optional_arguments_in_rhs
Optional arguments in rhs
Diffstat (limited to 'src')
-rw-r--r--src/parse.y7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/parse.y b/src/parse.y
index fab6397e6..43c0c7321 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -3061,14 +3061,13 @@ f_opt_asgn : tIDENTIFIER '='
f_opt : f_opt_asgn arg_value
{
- $$ = cons(nsym($1), $2);
+ $$ = cons(nsym($1), $2);
}
;
-f_block_opt : tIDENTIFIER '=' primary_value
+f_block_opt : f_opt_asgn primary_value
{
- local_add_f(p, $1);
- $$ = cons(nsym($1), $3);
+ $$ = cons(nsym($1), $2);
}
;