summaryrefslogtreecommitdiff
path: root/test/ripper/test_parser_events.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ripper/test_parser_events.rb')
-rw-r--r--test/ripper/test_parser_events.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 08296a241e..6f1fc92238 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -1219,14 +1219,17 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
def test_invalid_instance_variable_name
assert_equal("`@1' is not allowed as an instance variable name", compile_error('@1'))
assert_equal("`@%' is not allowed as an instance variable name", compile_error('@%'))
+ assert_equal("`@' without identifiers is not allowed as an instance variable name", compile_error('@'))
end
def test_invalid_class_variable_name
assert_equal("`@@1' is not allowed as a class variable name", compile_error('@@1'))
assert_equal("`@@%' is not allowed as a class variable name", compile_error('@@%'))
+ assert_equal("`@@' without identifiers is not allowed as a class variable name", compile_error('@@'))
end
def test_invalid_global_variable_name
assert_equal("`$%' is not allowed as a global variable name", compile_error('$%'))
+ assert_equal("`$' without identifiers is not allowed as a global variable name", compile_error('$'))
end
end if ripper_test