summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorSeiei Miyagi <hanachin@gmail.com>2019-04-23 00:21:50 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-04-23 12:16:15 +0900
commit6ca9e7cc0785c33f6d382176dbd79d6c91db72fe (patch)
tree6837a6a956435dcba754e6bdff60fd0a4c506ba5 /parse.y
parentae07b66aaa092c59ac9d544c9b582712290dc357 (diff)
Disallow numbered parameter as the default value of optional argument
[Fix GH-2139] [Bug #15783]
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index a97c01d69a..553f085937 100644
--- a/parse.y
+++ b/parse.y
@@ -4735,6 +4735,7 @@ f_norm_arg : f_bad_arg
| tIDENTIFIER
{
formal_argument(p, get_id($1));
+ p->max_numparam = -1;
$$ = $1;
}
;