diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-02 15:47:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-02 15:47:54 +0000 |
commit | 1457dca5d89487270554d7e90db8840780f2489f (patch) | |
tree | b5010fd4817516e9a300270dd51d845f67b0e287 /test/ripper/test_parser_events.rb | |
parent | 7054856938ad771b32e612f480e4767977dcab3f (diff) | |
download | ruby-1457dca5d89487270554d7e90db8840780f2489f.tar.gz |
* test/ripper/dummyparser.rb (DummyParser): improvement by Magnus
Holm in [ruby-core:25884].
* remove scanner events which simply returned the first argument.
* all parser events are now automatically generated.
* simplify blocks.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper/test_parser_events.rb')
-rw-r--r-- | test/ripper/test_parser_events.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb index f8db938d38..4a4854b28a 100644 --- a/test/ripper/test_parser_events.rb +++ b/test/ripper/test_parser_events.rb @@ -558,13 +558,13 @@ class TestRipper_ParserEvents < Test::Unit::TestCase def test_local_variables cmd = 'command(w,[regexp_literal(xstring_add(xstring_new(),25 # ),/)])' div = 'binary(ref(w),/,25)' - var = 'params(["w"])' + var = '[w]' bug1939 = '[ruby-core:24923]' assert_equal("[#{cmd}]", parse('w /25 # /'), bug1939) assert_equal("[assign(var_field(w),1),#{div}]", parse("w = 1; w /25 # /"), bug1939) - assert_equal("[fcall(p,[],&brace_block(block_var(#{var}),[#{div}]))]", parse("p{|w|w /25 # /\n}"), bug1939) - assert_equal("[def(p,paren(#{var}),bodystmt([#{div}]))]", parse("def p(w)\nw /25 # /\nend"), bug1939) + assert_equal("[fcall(p,[],&block([w],[#{div}]))]", parse("p{|w|w /25 # /\n}"), bug1939) + assert_equal("[def(p,[w],bodystmt([#{div}]))]", parse("def p(w)\nw /25 # /\nend"), bug1939) end end |