Project

General

Profile

Actions

Feature #16373

open

RDoc for some of the Kernel methods cannot be found in Kernel module

Added by soutaro (Soutaro Matsumoto) over 4 years ago. Updated almost 4 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:95957]
Tags:

Description

RDoc documentations for some of the Kernel methods including Kernel#then are registered as Object methods. I'd like to propose to move Kernel methods listed in Object class to Kernel class.

The following ri results are confusing to me because the Object methods are defined in Kernel module technically.

$ ri Kernel#then
Nothing known about Kernel#then
$ ri Object#then
[Prints documentation]

This is because of the implementation of RDoc that it treats Kernel methods as if they are defined in Object.

I'd like to disable the assignment and make Kernel methods listed in Kernel module.

Pros

  • The RDoc structure is more clear and precise
    • (This is essential to me that it makes easier to generate annotations for RBS files.)
  • Both of ri Kernel#then and ri Object#then print the documentation

Cons

  • The document of Object class will be almost empty, which may cause confusion for readers while there is a link to included module, Kernel
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0