diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-17 12:33:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-17 12:33:41 +0000 |
commit | e169fa941960ebcd7cc99eea64ef25d0fd9fe24d (patch) | |
tree | 749fadf690c54e39d681b054c7545b44ee141b64 /test/ruby | |
parent | e60c38cb9f5259d606ae71fe2d3eb3c7e4ba9076 (diff) | |
download | ruby-e169fa941960ebcd7cc99eea64ef25d0fd9fe24d.tar.gz |
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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_parse.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 819fc7df95..f92bb49e05 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -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 |