summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-08 00:10:32 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-08 00:11:22 +0900
commit8057129da61e7fc920b0cd1cb09105125819c10f (patch)
treebe1abc8dd1e6be455219c4c6ae6e4912c480f38b /parse.y
parent80e2242da6c4d7f1760cb08af72140e178642639 (diff)
Remove duplicate value checks on `mrhs` which always has the value
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 3ae456ca4c5..bf0d33a4917 100644
--- a/parse.y
+++ b/parse.y
@@ -1586,7 +1586,6 @@ stmt : keyword_alias fitem {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem
| lhs '=' lex_ctxt mrhs
{
/*%%%*/
- value_expr($4);
$$ = node_assign(p, $1, $4, $3, &@$);
/*% %*/
/*% ripper: assign!($1, $4) %*/
@@ -1595,7 +1594,6 @@ stmt : keyword_alias fitem {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem
{
/*%%%*/
YYLTYPE loc = code_loc_gen(&@5, &@6);
- value_expr($4);
$$ = node_assign(p, $1, NEW_RESCUE($4, NEW_RESBODY(0, remove_begin($6), 0, &loc), 0, &@$), $3, &@$);
/*% %*/
/*% ripper: massign!($1, rescue_mod!($4, $6)) %*/
@@ -2861,6 +2859,7 @@ opt_block_arg : ',' block_arg
}
;
+/* value */
args : arg_value
{
/*%%%*/
@@ -2891,10 +2890,12 @@ args : arg_value
}
;
+/* value */
mrhs_arg : mrhs
| arg_value
;
+/* value */
mrhs : args ',' arg_value
{
/*%%%*/