summaryrefslogtreecommitdiff
path: root/test/ruby/test_parse.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-03 14:56:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-03 15:15:54 +0900
commitc990b3c41af5957a739dfb235dfbb821e73a74df (patch)
tree3b238c404c143522973016b03b2e7f4b242c2e46 /test/ruby/test_parse.rb
parent22da5d71eaa50a749f8a08beb9bd6fe59e489449 (diff)
Fix the error token on "invalid hex escape"
* parse.y (tok_hex): flush token after dispatching the "invalid hex escape" parse error.
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r--test/ruby/test_parse.rb2
1 files changed, 1 insertions, 1 deletions
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)