Wrong handling of File::Constants in Ruby core docs
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 930
- Forks
- 465
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 27
Description
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 beforefile.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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/rdoc/parser/c.rb around line 455, then inspect how dir.c and file.c are parsed and how their definitions produce the File::Constants documentation URL. Reproduce the generated documentation and trace why the module is nested as File::File::Constants or omitted from File.html. Done means the generated docs show the module at the correct nesting and list it from File.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ruby
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100