rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

Wrong handling of File::Constants in Ruby core docs

Open zverok opened this issue 6 years ago • 1 comments

There is a wrong representation of File::Constants module as a File::File::Constants: https://docs.ruby-lang.org/en/trunk/File/File/Constants.html.

I believe the root causes are:

  • dir.c, defining some constants, parsed before file.c, defining the module;
  • special handling of dir.c's definitions here: https://github.com/ruby/rdoc/blob/master/lib/rdoc/parser/c.rb#L455
  • ...then I've lost the track :)

I believe that maybe it is a sane solution (as RDoc is Ruby's standard library), to just remove the "hack" and document all the constants in file.c (maybe with help of #ifdef 0, if there is no way to move them completely.

I'm ready for any other suggestions, too (want to fix the inconsistency before Ruby 2.7).

PS: I am not sure if it is related (= if RDoc is used inside), but on ruby-doc.org there are also problems in representation: nesting seems right: https://ruby-doc.org/core-2.6.3/File/Constants.html, but File docs doesn't list the module.

zverok avatar Aug 24 '19 16:08 zverok

Any thoughts on revisiting this @zverok

adam12 avatar Jan 28 '22 14:01 adam12