From 36918b27e8e297737e06d1aceed5d0a40584e06e Mon Sep 17 00:00:00 2001 From: Ilya Bylich Date: Wed, 10 Jun 2020 17:17:04 +0300 Subject: [PATCH] + ruby28.y: extracted excessed_comma rule. This commit tracks upstream commit ruby/ruby@cadd224. --- lib/parser/ruby28.y | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/parser/ruby28.y b/lib/parser/ruby28.y index 5f1ac18ec..e2e385e6e 100644 --- a/lib/parser/ruby28.y +++ b/lib/parser/ruby28.y @@ -1483,6 +1483,8 @@ opt_block_args_tail: result = [] } + excessed_comma: tCOMMA + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail { result = val[0]. @@ -1517,7 +1519,7 @@ opt_block_args_tail: concat(val[2]). concat(val[3]) } - | f_arg tCOMMA + | f_arg excessed_comma | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail { result = val[0].