rdoc 6.13.1 does not detect `private :new`
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 930
- Forks
- 465
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 27
Description
I'm not sure if this is a bug report or a feature request; I think it has worked in the past but I'm not sure.
Given an input foo.rb:
# Example Foo class should not document private new
class Foo
class << self
private :new
end
# This should not be documented
def initialize(...)
end
end
The generated documentation should not document the new class method.
I can work around this by adding # :nodoc:, but it feels like something that should be detected by the parser.
I'm updating a gem to be Ruby 3.2+, so if there's a better way to mark a private new in those versions that rdoc does detect, I can use that instead.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the foo.rb reproducer and run rdoc to inspect how private :new is represented in the generated documentation. Trace the parser handling of the private declaration and verify that the generated documentation no longer lists the new class method, while initialize remains undocumented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100