summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-16 21:01:45 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-16 21:08:33 +0900
commit47328ad217ecaf240f0faedac89723dcd6a917ac (patch)
tree190a3f20f9bba05cfbcb9c30f134b3c56c4460c5 /parse.y
parent359ad4423ed0f314822a3b97831fe9e4272ea347 (diff)
Ripper: Fixed erred token on wrong alias [Bug #17345]
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 185e8434414..9933fcfa499 100644
--- a/parse.y
+++ b/parse.y
@@ -607,6 +607,7 @@ static ID ripper_get_id(VALUE);
static VALUE ripper_get_value(VALUE);
#define get_value(val) ripper_get_value(val)
#define get_num(num) (int)get_id(num)
+#define get_cval(val) RNODE(val)->nd_cval
static VALUE assignable(struct parser_params*,VALUE);
static int id_is_var(struct parser_params *p, ID id);
@@ -1461,7 +1462,7 @@ stmt : keyword_alias fitem {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem
yyerror1(&@3, mesg);
$$ = NEW_BEGIN(0, &@$);
/*% %*/
- /*% ripper[error]: alias_error!(ERR_MESG(), var_alias!($2, $3)) %*/
+ /*% ripper[error]: alias_error!(ERR_MESG(), get_cval($3)) %*/
}
| keyword_undef undef_list
{