ruby-changes:71112
From: Peter <ko1@a...>
Date: Mon, 7 Feb 2022 23:52:28 +0900 (JST)
Subject: [ruby-changes:71112] f9a2802bc5 (master): [DOC] Use RDoc link style for links to other classes/modules
https://git.ruby-lang.org/ruby.git/commit/?id=f9a2802bc5 From f9a2802bc58b611a16108bbaf3473cb6195eac0d Mon Sep 17 00:00:00 2001 From: Peter Zhu <peter@p...> Date: Sun, 6 Feb 2022 10:30:11 -0500 Subject: [DOC] Use RDoc link style for links to other classes/modules I used this regex: ([A-Za-z]+)\.html#(?:class|module)-[A-Za-z]+-label-([A-Za-z0-9\-\+]+) And performed a global find & replace for this: rdoc-ref:$1@$2 --- array.c | 4 ++-- file.c | 4 ++-- hash.c | 8 ++++---- io.c | 14 +++++++------- numeric.c | 8 ++++---- object.c | 4 ++-- range.c | 4 ++-- string.c | 8 ++++---- struct.c | 4 ++-- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/array.c b/array.c index 8becdbbc91..630dbf424c 100644 --- a/array.c +++ b/array.c @@ -8080,8 +8080,8 @@ rb_ary_deconstruct(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L8080 * * First, what's elsewhere. \Class \Array: * - * - Inherits from {class Object}[Object.html#class-Object-label-What-27s+Here]. - * - Includes {module Enumerable}[Enumerable.html#module-Enumerable-label-What-27s+Here], + * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here]. + * - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here], * which provides dozens of additional methods. * * Here, class \Array provides methods that are useful for: diff --git a/file.c b/file.c index 0d0b9d59db..1fb661d3ef 100644 --- a/file.c +++ b/file.c @@ -6577,9 +6577,9 @@ const char ruby_null_device[] = https://github.com/ruby/ruby/blob/trunk/file.c#L6577 * * First, what's elsewhere. \Class \File: * - * - Inherits from {class IO}[IO.html#class-IO-label-What-27s+Here], + * - Inherits from {class IO}[rdoc-ref:IO@What-27s+Here], * in particular, methods for creating, reading, and writing files - * - Includes {module FileTest}[FileTest.html#module-FileTest-label-What-27s+Here]. + * - Includes {module FileTest}[rdoc-ref:FileTest@What-27s+Here]. * which provides dozens of additional methods. * * Here, class \File provides methods that are useful for: diff --git a/hash.c b/hash.c index 06b4652cde..ece9adee06 100644 --- a/hash.c +++ b/hash.c @@ -7014,8 +7014,8 @@ static const rb_data_type_t env_data_type = { https://github.com/ruby/ruby/blob/trunk/hash.c#L7014 * * First, what's elsewhere. \Class \Hash: * - * - Inherits from {class Object}[Object.html#class-Object-label-What-27s+Here]. - * - Includes {module Enumerable}[Enumerable.html#module-Enumerable-label-What-27s+Here], + * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here]. + * - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here], * which provides dozens of additional methods. * * Here, class \Hash provides methods that are useful for: @@ -7327,8 +7327,8 @@ Init_Hash(void) https://github.com/ruby/ruby/blob/trunk/hash.c#L7327 * * First, what's elsewhere. \Class \ENV: * - * - Inherits from {class Object}[Object.html#class-Object-label-What-27s+Here]. - * - Extends {module Enumerable}[Enumerable.html#module-Enumerable-label-What-27s+Here], + * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here]. + * - Extends {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here], * * Here, class \ENV provides methods that are useful for: * diff --git a/io.c b/io.c index 08a17aa02b..474c43c4c5 100644 --- a/io.c +++ b/io.c @@ -9715,12 +9715,12 @@ static VALUE argf_readlines(int, VALUE *, VALUE); https://github.com/ruby/ruby/blob/trunk/io.c#L9715 * * Returns an array containing the lines returned by calling * Kernel#gets until the end-of-file is reached; - * (see {Lines}[IO.html#class-IO-label-Lines]). + * (see {Lines}[rdoc-ref:IO@Lines]). * * With only string argument +sep+ given, * returns the remaining lines as determined by line separator +sep+, * or +nil+ if none; - * see {Line Separator}[IO.html#class-IO-label-Line+Separator].\: + * see {Line Separator}[rdoc-ref:IO@Line+Separator].\: * * # Default separator. * $ cat t.txt | ruby -e "p readlines" @@ -9740,7 +9740,7 @@ static VALUE argf_readlines(int, VALUE *, VALUE); https://github.com/ruby/ruby/blob/trunk/io.c#L9740 * * With only integer argument +limit+ given, * limits the number of bytes in the line; - * see {Line Limit}}[IO.html#class-IO-label-Line+Limit]: + * see {Line Limit}}[rdoc-ref:IO@Line+Limit]: * * $cat t.txt | ruby -e "p readlines 10" * ["First line", "\n", "Second lin", "e\n", "\n", "Fourth lin", "e\n", "Fifth line", "\n"] @@ -9752,10 +9752,10 @@ static VALUE argf_readlines(int, VALUE *, VALUE); https://github.com/ruby/ruby/blob/trunk/io.c#L9752 * ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"] * * With arguments +sep+ and +limit+ given, combines the two behaviors; - * see {Line Separator and Line Limit}[IO.html#class-IO-label-Line+Separator+and+Line+Limit]. + * see {Line Separator and Line Limit}[rdoc-ref:IO@Line+Separator+and+Line+Limit]. * * For all forms above, trailing optional keyword arguments may be given; - * see {Line Options}[IO.html#class-IO-label-Line+Options]: + * see {Line Options}[rdoc-ref:IO@Line+Options]: * * $ cat t.txt | ruby -e "p readlines(chomp: true)" * ["First line", "Second line", "", "Fourth line", "Fifth line"] @@ -14376,8 +14376,8 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y) https://github.com/ruby/ruby/blob/trunk/io.c#L14376 * * First, what's elsewhere. \Class \IO: * - * - Inherits from {class Object}[Object.html#class-Object-label-What-27s+Here]. - * - Includes {module Enumerable}[Enumerable.html#module-Enumerable-label-What-27s+Here], + * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here]. + * - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here], * which provides dozens of additional methods. * * Here, class \IO provides methods that are useful for: diff --git a/numeric.c b/numeric.c index 20ad13d4c2..7f70b02dad 100644 --- a/numeric.c +++ b/numeric.c @@ -958,7 +958,7 @@ num_negative_p(VALUE num) https://github.com/ruby/ruby/blob/trunk/numeric.c#L958 * * First, what's elsewhere. \Class \Float: * - * - Inherits from {class Numeric}[Numeric.html#class-Numeric-label-What-27s+Here]. + * - Inherits from {class Numeric}[rdoc-ref:Numeric@What-27s+Here]. * * Here, class \Float provides methods for: * @@ -3495,7 +3495,7 @@ rb_num2ull(VALUE val) https://github.com/ruby/ruby/blob/trunk/numeric.c#L3495 * * First, what's elsewhere. \Class \Integer: * - * - Inherits from {class Numeric}[Numeric.html#class-Numeric-label-What-27s+Here]. + * - Inherits from {class Numeric}[rdoc-ref:Numeric@What-27s+Here]. * * Here, class \Integer provides methods for: * @@ -6099,8 +6099,8 @@ int_s_try_convert(VALUE self, VALUE num) https://github.com/ruby/ruby/blob/trunk/numeric.c#L6099 * * First, what's elsewhere. \Class \Numeric: * - * - Inherits from {class Object}[Object.html#class-Object-label-What-27s+Here]. - * - Includes {module Comparable}[Comparable.html#module-Comparable-label-What-27s+Here]. + * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here]. + * - Includes {module Comparable}[rdoc-ref:Comparable@What-27s+Here]. * * Here, class \Numeric provides methods for: * diff --git a/object.c b/object.c index ef8a855dfb..4eff17f160 100644 --- a/object.c +++ b/object.c @@ -4162,8 +4162,8 @@ f_sprintf(int c, const VALUE *v, VALUE _) https://github.com/ruby/ruby/blob/trunk/object.c#L4162 * * First, what's elsewhere. \Class \Object: * - * - Inherits from {class BasicObject}[BasicObject.html#class-BasicObject-label-What-27s+Here]. - * - Includes {module Kernel}[Kernel.html#module-Kernel-label-What-27s+Here]. + * - Inherits from {class BasicObject}[rdoc-ref:BasicObject@What-27s+Here]. + * - Includes {module Kernel}[rdoc-ref:Kernel@What-27s+Here]. * * Here, class \Object provides methods for: * diff --git a/range.c b/range.c index 6eb7842313..8d8fe11991 100644 --- a/range.c +++ b/range.c @@ -2207,8 +2207,8 @@ range_count(int argc, VALUE *argv, VALUE range) https://github.com/ruby/ruby/blob/trunk/range.c#L2207 * * First, what's elsewhere. \Class \Range: * - * - Inherits from {class Object}[Object.html#class-Object-label-What-27s+Here]. - * - Includes {module Enumerable}[Enumerable.html#module-Enumerable-label-What-27s+Here], + * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here]. + * - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here], * which provides dozens of additional methods. * * Here, class \Range provides methods that are useful for: diff --git a/string.c b/string.c index 2dafe628b4..1c45688ce8 100644 --- a/string.c +++ b/string.c @@ -11291,8 +11291,8 @@ rb_str_unicode_normalized_p(int argc, VALUE *argv, VALUE str) https://github.com/ruby/ruby/blob/trunk/string.c#L11291 * * First, what's elsewhere. \Class \Symbol: * - * - Inherits from {class Object}[Object.html#class-Object-label-What-27s+Here]. - * - Includes {module Comparable}[Comparable.html#module-Comparable-label-What-27s+Here]. + * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here]. + * - Includes {module Comparable}[rdoc-ref:Comparable@What-27s+Here]. * * Here, class \Symbol provides methods that are useful for: * @@ -12095,8 +12095,8 @@ rb_enc_interned_str_cstr(const char *ptr, rb_encoding *enc) https://github.com/ruby/ruby/blob/trunk/string.c#L12095 * * First, what's elsewhere. \Class \String: * - * - Inherits from {class Object}[Object.html#class-Object-label-What-27s+Here]. - * - Includes {module Comparable}[Comparable.html#module-Comparable-label-What-27s+Here]. + * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here]. + * - Includes {module Comparable}[rdoc-ref:Comparable@What-27s+Here]. * * Here, class \String provides methods that are useful for: * diff --git a/struct.c b/struct.c index 5f7899d059..453ebfc989 100644 --- a/struct.c +++ b/struct.c @@ -1562,8 + (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/