Skip to content

rdoc 6.13.1 does not detect private :new #1364

Open
@halostatue

Description

@halostatue

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions