summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authorSoutaro Matsumoto <matsumoto@soutaro.com>2022-02-08 21:23:13 +0900
committergit <svn-admin@ruby-lang.org>2022-02-09 18:45:05 +0900
commitcbd54cba03d0a0ecae1df590ca78751362fda826 (patch)
treec0fdfff539aaecc6ffee587e56bc345b28dbbac3 /test/rdoc
parent88b1d21dbb64b4a310e589b1ac8b7661ea09500f (diff)
[ruby/rdoc] Skip parentheses on singleton class declaration
https://github.com/ruby/rdoc/commit/b6c6d4f978
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb
index 337cf9ea1a..b3026b14ca 100644
--- a/test/rdoc/test_rdoc_parser_ruby.rb
+++ b/test/rdoc/test_rdoc_parser_ruby.rb
@@ -4345,4 +4345,17 @@ end
assert_equal 'Hello', meth.comment.text
end
+ def test_parenthesized_cdecl
+ util_parser <<-RUBY
+module DidYouMean
+ class << (NameErrorCheckers = Object.new)
+ end
+end
+ RUBY
+
+ @parser.scan
+
+ refute_predicate @store.find_class_or_module('DidYouMean'), :nil?
+ refute_predicate @store.find_class_or_module('DidYouMean::NameErrorCheckers'), :nil?
+ end
end