diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-11 21:23:20 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-11 21:23:20 +0000 |
commit | b7db271c021c6482ed619cfff2d613c0540eeca4 (patch) | |
tree | 9f3a1ba8bb0b2943eafc50092122d7d554a225e1 /test | |
parent | 5d397b488e190b4c3012e1ec146dc6161f7c3952 (diff) |
merges r30799 from trunk into ruby_1_9_2.
--
* parse.y (mlhs_basic): include mlhs_post for ripper. a patch
from Michael Edgar at [ruby-core:35078].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ripper/test_parser_events.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb index 15a5d2b3a9..3958213f77 100644 --- a/test/ripper/test_parser_events.rb +++ b/test/ripper/test_parser_events.rb @@ -368,6 +368,7 @@ class TestRipper::ParserEvents < Test::Unit::TestCase def test_mlhs_add_star bug2232 = '[ruby-core:26163]' + bug4364 = '[ruby-core:35078]' thru_mlhs_add_star = false tree = parse("a, *b = 1, 2", :on_mlhs_add_star) {thru_mlhs_add_star = true} @@ -377,6 +378,18 @@ class TestRipper::ParserEvents < Test::Unit::TestCase tree = parse("a, *b, c = 1, 2", :on_mlhs_add_star) {thru_mlhs_add_star = true} assert_equal true, thru_mlhs_add_star assert_match(/mlhs_add\(mlhs_add_star\(mlhs_add\(mlhs_new\(\),a\),b\),mlhs_add\(mlhs_new\(\),c\)\)/, tree, bug2232) + thru_mlhs_add_star = false + tree = parse("a, *, c = 1, 2", :on_mlhs_add_star) {thru_mlhs_add_star = true} + assert_equal true, thru_mlhs_add_star + assert_match(/mlhs_add\(mlhs_add_star\(mlhs_add\(mlhs_new\(\),a\)\),mlhs_add\(mlhs_new\(\),c\)\)/, tree, bug4364) + thru_mlhs_add_star = false + tree = parse("*b, c = 1, 2", :on_mlhs_add_star) {thru_mlhs_add_star = true} + assert_equal true, thru_mlhs_add_star + assert_match(/mlhs_add\(mlhs_add_star\(mlhs_new\(\),b\),mlhs_add\(mlhs_new\(\),c\)\)/, tree, bug4364) + thru_mlhs_add_star = false + tree = parse("*, c = 1, 2", :on_mlhs_add_star) {thru_mlhs_add_star = true} + assert_equal true, thru_mlhs_add_star + assert_match(/mlhs_add\(mlhs_add_star\(mlhs_new\(\)\),mlhs_add\(mlhs_new\(\),c\)\)/, tree, bug4364) end def test_mlhs_new |