Skip to content

Support for endless method definitions #885

Closed

Description

@gemmaro

It seems that RDoc does not yet support the endless method at this time.

Here is a small example:

lib/main.rb:

class AAA
  def aaa = :aaa
end

class BBB; end

then $ rdoc produces following document:

  • Class and Module Index
    • AAA
    • AAA::BBB (if correct, it is BBB)
  • class AAA's public instance methods: the following screenshot

Screen Shot 2022-05-23 at 12 28 00

In other words, the end of the range of method aaa is misidentified as the end of class AAA.

This doesn't happen if the method isn't defined as the endless method.

Using following versions:

$ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]

$ rdoc -v
6.4.0

Activity

  1. halostatue commented on Jun 1, 2025

    @halostatue

    This is fixed with RDOC_USE_PRISM_PARSER.

  2. gemmaro commented on Jun 3, 2025

    @gemmaro
    ContributorAuthor

    Thank you for letting me know! I've confirmed that everything is working as expected, so I'll close this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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