diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-09-04 00:07:50 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-09-24 21:57:54 +0900 |
commit | ea68bb914a3c806a1c5188993b96791a76ab0849 (patch) | |
tree | 085fe4bbf44e546143ba2ee950298bf269785d7a /test/ripper/test_parser_events.rb | |
parent | e73cc3eead75b27eabf93a7163bed511f2bb3b17 (diff) | |
download | ruby-ea68bb914a3c806a1c5188993b96791a76ab0849.tar.gz |
Changed numbered parameter prefix
Diffstat (limited to 'test/ripper/test_parser_events.rb')
-rw-r--r-- | test/ripper/test_parser_events.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb index 1bae1e31ad..662ab3d7fe 100644 --- a/test/ripper/test_parser_events.rb +++ b/test/ripper/test_parser_events.rb @@ -58,7 +58,10 @@ class TestRipper::ParserEvents < Test::Unit::TestCase assert_equal '[assign(var_field(a),ref(a))]', parse('a=a') assert_equal '[ref(nil)]', parse('nil') assert_equal '[ref(true)]', parse('true') - assert_include parse('proc{@1}'), '[ref(@1)]' + assert_equal '[vcall(_0)]', parse('_0') + assert_equal '[vcall(_1)]', parse('_1') + assert_include parse('proc{_0}'), '[ref(_0)]' + assert_include parse('proc{_1}'), '[ref(_1)]' end def test_vcall @@ -1505,11 +1508,8 @@ class TestRipper::ParserEvents < Test::Unit::TestCase assert_equal("unterminated regexp meets end of file", compile_error('/')) end - def test_invalid_numbered_parameter_name - assert_equal("leading zero is not allowed as a numbered parameter", compile_error('proc{@0}')) - end - def test_invalid_instance_variable_name + assert_equal("`@1' is not allowed as an instance variable name", compile_error('proc{@1}')) assert_equal("`@' without identifiers 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 |