You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently #11065 is the only use of :inherit: in the standard library's documentation, and it turns out those defs do not have the "copied from" heading attached:
Contrast with Tuple#to_a, which has no docs:
A bare :inherit: merely makes this default behaviour explicit, so it should produce the "copied from" heading as well. For :inherit: followed by additional documentation in the overriding method I'm not so sure.
The text was updated successfully, but these errors were encountered:
This behaviour is actually intended, see the original discussion in #6989
The idea is that :inherit: is an explicit decision to re-use the same documentation because it applies to the overriding method as well.
The note about inherited documentation is particularly relevant when the overriding method does not have any doc comment and the parent documentation is implicitly inherited. The notice makes it clear that the documentation is not written for this specific method and might not be accurate.
Using the same note for :inherit: would make it impossible to distinguish implicitly vs. explicitly inherited docs. I think it's important to show a difference.
Maybe there could be a different note. But I'm not sure if there is much benefit from showing that the documentation is inherited explicitly.
A link to the overridden method might be useful though in any case of overriding a method. Even if the overriding method has its own documentation.
Apparently #11065 is the only use of
:inherit:
in the standard library's documentation, and it turns out those defs do not have the "copied from" heading attached:Contrast with
Tuple#to_a
, which has no docs:A bare
:inherit:
merely makes this default behaviour explicit, so it should produce the "copied from" heading as well. For:inherit:
followed by additional documentation in the overriding method I'm not so sure.The text was updated successfully, but these errors were encountered: