Skip to content

rdoc 6.13.1 does not detect private :new #1364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
halostatue opened this issue May 10, 2025 · 0 comments
Open

rdoc 6.13.1 does not detect private :new #1364

halostatue opened this issue May 10, 2025 · 0 comments

Comments

@halostatue
Copy link

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.

Image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant