From c990b3c41af5957a739dfb235dfbb821e73a74df Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 3 Jun 2019 14:56:42 +0900 Subject: Fix the error token on "invalid hex escape" * parse.y (tok_hex): flush token after dispatching the "invalid hex escape" parse error. --- test/ruby/test_parse.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby') diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index fca8d7484a..ff62aef785 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -513,7 +513,7 @@ class TestParse < Test::Unit::TestCase mesg = 'from the backslash through the invalid char' e = assert_syntax_error('"\xg1"', /hex escape/) - assert_equal(' ^', e.message.lines.last, mesg) + assert_equal(' ^~', e.message.lines.last, mesg) e = assert_syntax_error('"\u{1234"', 'unterminated Unicode escape') assert_equal(' ^', e.message.lines.last, mesg) -- cgit v1.2.3