diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-05-28 08:44:28 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-05-28 09:00:02 +0900 |
commit | 1cdaa17a065c529354fa9bcb4a1f3001783900ef (patch) | |
tree | e2edd2ebf20a19f9b20f9ce94d7516ddf5e0399a /test/ruby/test_parse.rb | |
parent | 57b4df07bc1e863c48a3b0f4c3185de431454695 (diff) |
parse.y: numbered parameter symbol
* parse.y (parse_atmark): numbered parameter name is not allowed
as a symbol regardless the context.
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r-- | test/ruby/test_parse.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index e21f1f9515..11a77bacd8 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -590,6 +590,11 @@ class TestParse < Test::Unit::TestCase assert_equal(:foobar, eval(':"foo\u{}bar"')) assert_equal(:foobar, eval(':"foo\u{ }bar"')) end + + assert_syntax_error(':@@', /is not allowed/) + assert_syntax_error(':@@1', /is not allowed/) + assert_syntax_error(':@', /is not allowed/) + assert_syntax_error(':@1', /is not allowed/) end def test_parse_string |