summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_parser_ruby.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-12-24 07:00:35 +0900
committeraycabta <aycabta@gmail.com>2019-12-24 07:58:53 +0900
commite50e55269358520dc55595a9c3e074d351d96b66 (patch)
tree11b550b72892e6dfb0b68b62ddf767dddd33f785 /test/rdoc/test_rdoc_parser_ruby.rb
parent819b604037c317d2b53a1aaca67aef25da2d5ec9 (diff)
downloadruby-e50e55269358520dc55595a9c3e074d351d96b66.tar.gz
[ruby/rdoc] Treat Proc#call syntax sugar for constant correctly
https://github.com/ruby/rdoc/commit/957d041ae0
Diffstat (limited to 'test/rdoc/test_rdoc_parser_ruby.rb')
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb
index 99f4de2fcb..8673225cad 100644
--- a/test/rdoc/test_rdoc_parser_ruby.rb
+++ b/test/rdoc/test_rdoc_parser_ruby.rb
@@ -830,6 +830,17 @@ end
assert_equal @top_level, blah.file
end
+ def test_parse_call_syntax_sugar_for_constant
+ util_parser <<-CODE
+Foo = proc{}
+Foo::()
+ CODE
+
+ assert_nothing_raised do
+ @parser.scan
+ end
+ end
+
def test_parse_class_multi_ghost_methods
util_parser <<-'CLASS'
class Foo