summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-20 06:28:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-20 06:28:51 +0000
commit140a1aef56af3dd6f346ae8036f7c37545c39534 (patch)
tree02d55c1ff870589c059227218d2c909f78a8350f /test
parentb682d78ff592acdd857ac5f81c4a0efd75a3fa82 (diff)
downloadruby-140a1aef56af3dd6f346ae8036f7c37545c39534.tar.gz
ruby-140a1aef56af3dd6f346ae8036f7c37545c39534.tar.xz
ruby-140a1aef56af3dd6f346ae8036f7c37545c39534.zip
* parse.y (method_call): dispatch symbols. a patch from Andy Keep in
[ruby-core:26169]. [ruby-core:26165] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ripper/test_parser_events.rb22
1 files changed, 18 insertions, 4 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index e82d37c1d..6ca81d3f0 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -202,6 +202,24 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
assert_equal true, thru_bodystmt
end
+ def test_call
+ bug2233 = '[ruby-core:26165]'
+ tree = nil
+
+ thru_call = false
+ assert_nothing_raised {
+ tree = parse("self.foo", :on_call) {thru_call = true}
+ }
+ assert_equal true, thru_call
+ assert_equal "[call(ref(self),.,foo)]", tree
+ thru_call = false
+ assert_nothing_raised(bug2233) {
+ tree = parse("foo.()", :on_call) {thru_call = true}
+ }
+ assert_equal true, thru_call
+ assert_equal "[call(ref(foo),.,call,[])]", tree
+ end
+
def test_heredoc
bug1921 = '[ruby-core:24855]'
thru_heredoc_beg = false
@@ -265,10 +283,6 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
assert_equal true, $thru__break
end
- def test_call
- assert_equal true, $thru__call
- end
-
def test_case
assert_equal true, $thru__case
end