ruby-changes:62745
From: Burdette <ko1@a...>
Date: Sat, 29 Aug 2020 03:39:40 +0900 (JST)
Subject: [ruby-changes:62745] 4a5dd970a7 (master): Add alias treatment to method_documentation.rdoc (#3468)
https://git.ruby-lang.org/ruby.git/commit/?id=4a5dd970a7 From 4a5dd970a750e90a9fe98d66babfa53665429221 Mon Sep 17 00:00:00 2001 From: Burdette Lamar <BurdetteLamar@Y...> Date: Fri, 28 Aug 2020 13:39:16 -0500 Subject: Add alias treatment to method_documentation.rdoc (#3468) * Add alias treatment to method_documentation.rdoc diff --git a/doc/method_documentation.rdoc b/doc/method_documentation.rdoc index 26abd88..0432216 100644 --- a/doc/method_documentation.rdoc +++ b/doc/method_documentation.rdoc @@ -23,6 +23,7 @@ The general structure of the method documentation should be: https://github.com/ruby/ruby/blob/trunk/doc/method_documentation.rdoc#L23 * Details and Examples * Argument Description (if necessary) * Corner Cases and Exceptions +* Aliases * Related Methods (optional) == call-seq (for methods written in C) @@ -62,6 +63,8 @@ Instead of: https://github.com/ruby/ruby/blob/trunk/doc/method_documentation.rdoc#L63 However, as shown above for <tt>Array#count</tt>, use separate lines if the behavior is different if the argument is omitted. +Omit aliases from the call-seq. + == Synopsis The synopsis comes next, and is a short description of what the @@ -131,6 +134,10 @@ you do not need to document that a TypeError is raised if a non-integer https://github.com/ruby/ruby/blob/trunk/doc/method_documentation.rdoc#L134 is passed. Do not provide examples of exceptions being raised unless that is a common case, such as Hash#fetch raising KeyError. +== Aliases + +Mention aliases in the form "Array#find_index is an alias for Array#index." + == Related Methods (optional) In some cases, it is useful to document which methods are related to -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/