aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-10 12:15:48 +0900
committerNARUSE, Yui <naruse@airemix.jp>2020-03-14 16:12:44 +0900
commiteabf35a5d298c68f45dc600477fc586d7b868788 (patch)
treed1d9bf601e211630711d349b47e4737ebd0fe9eb /parse.y
parentfa48a26d886d86469a0075d91d152252e9fc0c8c (diff)
downloadruby-eabf35a5d298c68f45dc600477fc586d7b868788.tar.gz
Fixed duplicated warning
As `command_rhs` is always a "value expression", `command_asgn` does not need the same check. [Bug #16619] (cherry picked from commit 6e6844320de989cb88a154e2ac75066ccea1bba2)
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 0 insertions, 6 deletions
diff --git a/parse.y b/parse.y
index 16c464e49e..c767637adf 100644
--- a/parse.y
+++ b/parse.y
@@ -1461,7 +1461,6 @@ stmt : keyword_alias fitem {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem
command_asgn : lhs '=' command_rhs
{
/*%%%*/
- value_expr($3);
$$ = node_assign(p, $1, $3, &@$);
/*% %*/
/*% ripper: assign!($1, $3) %*/
@@ -1469,7 +1468,6 @@ command_asgn : lhs '=' command_rhs
| var_lhs tOP_ASGN command_rhs
{
/*%%%*/
- value_expr($3);
$$ = new_op_assign(p, $1, $2, $3, &@$);
/*% %*/
/*% ripper: opassign!($1, $2, $3) %*/
@@ -1477,7 +1475,6 @@ command_asgn : lhs '=' command_rhs
| primary_value '[' opt_call_args rbracket tOP_ASGN command_rhs
{
/*%%%*/
- value_expr($6);
$$ = new_ary_op_assign(p, $1, $3, $5, $6, &@3, &@$);
/*% %*/
/*% ripper: opassign!(aref_field!($1, escape_Qundef($3)), $5, $6) %*/
@@ -1486,7 +1483,6 @@ command_asgn : lhs '=' command_rhs
| primary_value call_op tIDENTIFIER tOP_ASGN command_rhs
{
/*%%%*/
- value_expr($5);
$$ = new_attr_op_assign(p, $1, $2, $3, $4, $5, &@$);
/*% %*/
/*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
@@ -1494,7 +1490,6 @@ command_asgn : lhs '=' command_rhs
| primary_value call_op tCONSTANT tOP_ASGN command_rhs
{
/*%%%*/
- value_expr($5);
$$ = new_attr_op_assign(p, $1, $2, $3, $4, $5, &@$);
/*% %*/
/*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
@@ -1510,7 +1505,6 @@ command_asgn : lhs '=' command_rhs
| primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_rhs
{
/*%%%*/
- value_expr($5);
$$ = new_attr_op_assign(p, $1, ID2VAL(idCOLON2), $3, $4, $5, &@$);
/*% %*/
/*% ripper: opassign!(field!($1, ID2VAL(idCOLON2), $3), $4, $5) %*/