summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-15 15:39:58 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-15 17:27:36 +0900
commit89802078f9f406be411032814e1960e62dbc7ce2 (patch)
treeb80377ebf0a293c5bb7dcac38791cc2026e7d158 /test/ruby
parent5a7f5bb0de982d7f1eaaaba1c900242a890ede16 (diff)
[Bug #19882] Reject tokens invalid as symbols
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_parse.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index 2f1a522dc2..34a8848c52 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -661,6 +661,7 @@ class TestParse < Test::Unit::TestCase
assert_syntax_error(':@@1', /is not allowed/)
assert_syntax_error(':@', /is not allowed/)
assert_syntax_error(':@1', /is not allowed/)
+ assert_syntax_error(':$01234', /is not allowed/)
end
def test_parse_string
@@ -1478,8 +1479,8 @@ x = __ENCODING__
end
def test_ungettable_gvar
- assert_syntax_error('$01234', /not valid to get/)
- assert_syntax_error('"#$01234"', /not valid to get/)
+ assert_syntax_error('$01234', /not allowed/)
+ assert_syntax_error('"#$01234"', /not allowed/)
end
=begin