parse.y: unexpected tINTEGER message

* parse.y (parser_number_literal_suffix): keep token after numeric
  suffix to show the value in an error message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-08-17 12:33:41 +00:00
parent e60c38cb9f
commit e169fa9419
2 changed files with 6 additions and 3 deletions

View file

@ -987,6 +987,9 @@ x = __ENCODING__
begin;
assert_syntax_error("def f r:def d; def f 0end", /unexpected/)
end;
assert_syntax_error("def\nf(000)end", /^ \^~~/)
assert_syntax_error("def\nf(&)end", /^ \^/)
end
def test_method_location_in_rescue