summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parse.y3
-rw-r--r--test/ripper/test_parser_events.rb2
2 files changed, 3 insertions, 2 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
{
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 771434ff829..014403a784b 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -96,7 +96,7 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
end
def test_alias_error
- assert_equal '[aliaserr(valias($a,$1))]', parse('alias $a $1')
+ assert_equal '[aliaserr($1)]', parse('alias $a $1')
end
def test_arglist