Project

General

Profile

Actions

Bug #19914

closed

RDoc :method: directives swallowed by immediate private keyword

Added by zzak (zzak _) 7 months ago. Updated 7 months ago.

Status:
Feedback
Assignee:
-
Target version:
-
[ruby-core:114972]

Description

Updated by austin (Austin Ziegler) 7 months ago

zzak (zzak _) wrote:

@jonathanhefner (Jonathan Hefner) Recently discovered this bug in RDoc and fixed it in Rails, so I'm reporting it here on their behalf.

Examples:

This should probably be reported to https://github.com/ruby/rdoc/issues instead.

Updated by nobu (Nobuyoshi Nakada) 7 months ago

With a simplified example like bellow, private does not affect the results.

class Bug19914
  ##
  # :method: foo
  #
  # :call-seq: foo(*args)
  #
  # Foo

  private
end

Updated by nobu (Nobuyoshi Nakada) 7 months ago

It appears that the next method takes precedence over the :method: directive.
And that directive seems like parsed as a simple document.

Updated by nobu (Nobuyoshi Nakada) 7 months ago

  • Status changed from Open to Feedback

It has been documented.

https://github.com/ruby/rdoc/blob/master/lib/rdoc/parser/ruby.rb#L141-L142

Note that by default, the :method: directive will be ignored if there is a
standard rdocable item following it.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0