diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-05 11:35:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-05 11:35:24 +0000 |
commit | 59f59f82d42e32980694ae7b8cd2b55384eb5918 (patch) | |
tree | f8f52819ed5ef74a9779902e2e2459d04bf210f3 /test | |
parent | 56a6dd66d4deff3edc2af09271c50619a05cf1ea (diff) |
parse.y: refine error messages
* parse.y: refine error messages for tSYMBEG and tSTRING_BEG, which
can appear at invalid places.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_syntax.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 5534056327..8cbb05a449 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -905,6 +905,11 @@ eom assert_syntax_error(":#\n foo", /unexpected ':'/) end + def test_invalid_literal_message + assert_syntax_error("def :foo", /unexpected symbol literal/) + assert_syntax_error("def 'foo'", /unexpected string literal/) + end + def test_fluent_dot assert_valid_syntax("a\n.foo") assert_valid_syntax("a\n&.foo") |