Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/rdoc/parser/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,8 @@ def visit_call_node(node)
_visit_call_include(node)
when :extend
_visit_call_extend(node)
when :included
node.block ? node.block.body&.accept(self) : super
Comment on lines +895 to +896
when :public
super
_visit_call_public_private_protected(node, :public)
Expand Down
7 changes: 5 additions & 2 deletions test/rdoc/parser/ruby_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,9 @@ module A
# :method: bar
# comment bar
add_my_method :bar

# Returns the configuration.
def self.configurations; end
end

metaprogramming do
Expand All @@ -753,8 +756,8 @@ def baz1; end
RUBY
mod = @store.find_module_named 'A'
methods = mod.method_list
assert_equal ['A::foo', 'A#bar', 'A::baz2', 'A#baz3'], methods.map(&:full_name)
assert_equal ['comment foo', 'comment bar'], methods.take(2).map { |m| m.comment.text.strip }
assert_equal ['A::foo', 'A#bar', 'A::configurations', 'A::baz2', 'A#baz3'], methods.map(&:full_name)
assert_equal ['comment foo', 'comment bar', 'Returns the configuration.'], methods.take(3).map { |m| m.comment.text.strip }
Comment on lines +759 to +760
end

def test_method_yields_directive
Expand Down