Project

General

Profile

Actions

Bug #19914

closed

RDoc :method: directives swallowed by immediate private keyword

Added by zzak (zzak _) about 1 year ago. Updated about 1 year ago.

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

Description

Updated by austin (Austin Ziegler) about 1 year 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) about 1 year 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) about 1 year 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) about 1 year 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