ruby / ruby/rdoc

Don't include method documentation for aliased methods

Open
#1,533 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
930
Forks
465
Avg merge
3d 10h
Merged PRs (30d)
27

Description

In Ruby, the documentation guide states:

Omit aliases from the call-seq, unless the alias is an operator method.

This is intended prevent documentation duplication and have the reader read the documentation for the original method. However, this leads to all of the aliases to not have call-seq so the method appears to accept no arguments and is misleading to the reader (e.g. Array#find and the alias Array#detect appears to take no arguments).

I think RDoc should (at least have the option to) avoid generating documentation for aliased methods.

(This discussion originated from https://github.com/ruby/ruby/pull/15756)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documentation guide section linked in the issue, then reproduce the generated Array#find and Array#detect documentation to understand the alias behavior. Inspect RDoc's handling of aliased methods and determine how an optional suppression mode should work. Done means aliases no longer produce misleading duplicate documentation while the original method remains documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.