summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-01-02 12:36:06 +0900
committerNobuyoshi Nakada <[email protected]>2025-01-02 12:36:06 +0900
commite433e6515efbb31a77ab8013a7e9b2c57212264d (patch)
treee3eed22a0d78f6ebc1fca5a79ded1ead9a3e7a4a
parentb4ec22fe6c493a212c059cecab90de5b5f349102 (diff)
[DOC] Exclude 'Class' and 'Module' from RDoc's autolinking
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12496
-rw-r--r--.rdoc_options2
-rw-r--r--array.c2
-rw-r--r--compar.c2
-rw-r--r--complex.c2
-rw-r--r--dir.rb2
-rw-r--r--doc/contributing/documentation_guide.md2
-rw-r--r--doc/encodings.rdoc2
-rw-r--r--doc/maintainers.md2
-rw-r--r--doc/marshal.rdoc4
-rw-r--r--doc/math/math.rdoc2
-rw-r--r--enum.c2
-rw-r--r--error.c4
-rw-r--r--file.c6
-rw-r--r--hash.c6
-rw-r--r--io.c12
-rw-r--r--numeric.c6
-rw-r--r--object.c6
-rw-r--r--process.c4
-rw-r--r--ractor.rb2
-rw-r--r--range.c2
-rw-r--r--string.c2
-rw-r--r--string.rb2
-rw-r--r--struct.c8
-rw-r--r--timev.rb2
24 files changed, 44 insertions, 42 deletions
diff --git a/.rdoc_options b/.rdoc_options
index 5e9ad51721..07a4709c8f 100644
--- a/.rdoc_options
+++ b/.rdoc_options
@@ -13,7 +13,9 @@ exclude:
- .gemspec
autolink_excluded_words:
+- Class
- Method
+- Module
- Process
- Ruby
- Set
diff --git a/array.c b/array.c
index 92652515c1..50a554b3c2 100644
--- a/array.c
+++ b/array.c
@@ -8557,7 +8557,7 @@ rb_ary_deconstruct(VALUE ary)
*
* == What's Here
*
- * First, what's elsewhere. \Class +Array+:
+ * First, what's elsewhere. Class +Array+:
*
* - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
* - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
diff --git a/compar.c b/compar.c
index 8d7a208185..f5da6178cf 100644
--- a/compar.c
+++ b/compar.c
@@ -293,7 +293,7 @@ cmp_clamp(int argc, VALUE *argv, VALUE x)
*
* == What's Here
*
- * \Module \Comparable provides these methods, all of which use method <tt>#<=></tt>:
+ * Module \Comparable provides these methods, all of which use method <tt>#<=></tt>:
*
* - #<: Returns whether +self+ is less than the given object.
* - #<=: Returns whether +self+ is less than or equal to the given object.
diff --git a/complex.c b/complex.c
index 2c05586e08..6e4ec3b6c2 100644
--- a/complex.c
+++ b/complex.c
@@ -2522,7 +2522,7 @@ float_arg(VALUE self)
*
* First, what's elsewhere:
*
- * - \Class \Complex inherits (directly or indirectly)
+ * - Class \Complex inherits (directly or indirectly)
* from classes {Numeric}[rdoc-ref:Numeric@What-27s+Here]
* and {Object}[rdoc-ref:Object@What-27s+Here].
* - Includes (indirectly) module {Comparable}[rdoc-ref:Comparable@What-27s+Here].
diff --git a/dir.rb b/dir.rb
index 08f7583111..6cbfe1fb14 100644
--- a/dir.rb
+++ b/dir.rb
@@ -83,7 +83,7 @@
#
# == What's Here
#
-# First, what's elsewhere. \Class \Dir:
+# First, what's elsewhere. Class \Dir:
#
# - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
# - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
diff --git a/doc/contributing/documentation_guide.md b/doc/contributing/documentation_guide.md
index a4df55e244..7971fc16e9 100644
--- a/doc/contributing/documentation_guide.md
+++ b/doc/contributing/documentation_guide.md
@@ -202,7 +202,7 @@ However, _do_ suppress auto-linking when the word in question
does not refer to a Ruby entity (e.g., some uses of _Class_ or _English_):
```rdoc
-\Class variables can be tricky.
+Class variables can be tricky.
```
renders as:
diff --git a/doc/encodings.rdoc b/doc/encodings.rdoc
index e563aad296..7ec097c516 100644
--- a/doc/encodings.rdoc
+++ b/doc/encodings.rdoc
@@ -30,7 +30,7 @@ Other characters, such as the Euro symbol, are multi-byte:
s = "\u20ac" # => "€"
s.bytes # => [226, 130, 172]
-== The \Encoding \Class
+== The \Encoding Class
=== \Encoding Objects
diff --git a/doc/maintainers.md b/doc/maintainers.md
index a1ab8cf855..15dbafbe73 100644
--- a/doc/maintainers.md
+++ b/doc/maintainers.md
@@ -9,7 +9,7 @@ and publishing Ruby patch releases.
[The list of current branch maintainers is available in the wiki](https://github.com/ruby/ruby/wiki/Release-Engineering).
-## \Module Maintainers
+## Module Maintainers
A module maintainer is responsible for a certain part of Ruby.
diff --git a/doc/marshal.rdoc b/doc/marshal.rdoc
index abf9467262..b60286a396 100644
--- a/doc/marshal.rdoc
+++ b/doc/marshal.rdoc
@@ -188,9 +188,9 @@ bytes:
result += (byte * 2 ** (exp * 8))
end
-=== Class and Module
+=== +Class+ and +Module+
-"c" represents a Class object, "m" represents a Module and "M" represents
+"c" represents a +Class+ object, "m" represents a +Module+ and "M" represents
either a class or module (this is an old-style for compatibility). No class
or module content is included, this type is only a reference. Following the
type byte is a byte sequence which is used to look up an existing class or
diff --git a/doc/math/math.rdoc b/doc/math/math.rdoc
index 7a89df951c..2978375564 100644
--- a/doc/math/math.rdoc
+++ b/doc/math/math.rdoc
@@ -1,4 +1,4 @@
-\Module \Math provides methods for basic trigonometric,
+Module \Math provides methods for basic trigonometric,
logarithmic, and transcendental functions, and for extracting roots.
You can write its constants and method calls thus:
diff --git a/enum.c b/enum.c
index ac73f671b6..233f56607c 100644
--- a/enum.c
+++ b/enum.c
@@ -4939,7 +4939,7 @@ enum_compact(VALUE obj)
/*
* == What's Here
*
- * \Module \Enumerable provides methods that are useful to a collection class for:
+ * Module \Enumerable provides methods that are useful to a collection class for:
*
* - {Querying}[rdoc-ref:Enumerable@Methods+for+Querying]
* - {Fetching}[rdoc-ref:Enumerable@Methods+for+Fetching]
diff --git a/error.c b/error.c
index 020ef1f165..1a67316b08 100644
--- a/error.c
+++ b/error.c
@@ -3486,7 +3486,7 @@ syserr_eqq(VALUE self, VALUE exc)
/*
* Document-class: Exception
*
- * \Class +Exception+ and its subclasses are used to indicate that an error
+ * Class +Exception+ and its subclasses are used to indicate that an error
* or other problem has occurred,
* and may need to be handled.
* See {Exceptions}[rdoc-ref:exceptions.md].
@@ -3503,7 +3503,7 @@ syserr_eqq(VALUE self, VALUE exc)
* - An optional cause;
* see method #cause.
*
- * == Built-In \Exception \Class Hierarchy
+ * == Built-In \Exception Class Hierarchy
*
* The hierarchy of built-in subclasses of class +Exception+:
*
diff --git a/file.c b/file.c
index 585dd90665..2c603ecd4d 100644
--- a/file.c
+++ b/file.c
@@ -6652,7 +6652,7 @@ const char ruby_null_device[] =
/*
* A \File object is a representation of a file in the underlying platform.
*
- * \Class \File extends module FileTest, supporting such singleton methods
+ * Class \File extends module FileTest, supporting such singleton methods
* as <tt>File.exist?</tt>.
*
* == About the Examples
@@ -7309,7 +7309,7 @@ const char ruby_null_device[] =
*
* == What's Here
*
- * First, what's elsewhere. \Class \File:
+ * First, what's elsewhere. Class \File:
*
* - Inherits from {class IO}[rdoc-ref:IO@What-27s+Here],
* in particular, methods for creating, reading, and writing files
@@ -7555,7 +7555,7 @@ Init_File(void)
/*
* Document-module: File::Constants
*
- * \Module +File::Constants+ defines file-related constants.
+ * Module +File::Constants+ defines file-related constants.
*
* There are two families of constants here:
*
diff --git a/hash.c b/hash.c
index 8be9db7d80..037e435d6e 100644
--- a/hash.c
+++ b/hash.c
@@ -6969,7 +6969,7 @@ static const rb_data_type_t env_data_type = {
*
* === What's Here
*
- * First, what's elsewhere. \Class +Hash+:
+ * First, what's elsewhere. Class +Hash+:
*
* - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
* - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
@@ -6989,7 +6989,7 @@ static const rb_data_type_t env_data_type = {
* - {Transforming Keys and Values}[rdoc-ref:Hash@Methods+for+Transforming+Keys+and+Values]
* - {And more....}[rdoc-ref:Hash@Other+Methods]
*
- * \Class +Hash+ also includes methods from module Enumerable.
+ * Class +Hash+ also includes methods from module Enumerable.
*
* ==== Methods for Creating a +Hash+
*
@@ -7283,7 +7283,7 @@ Init_Hash(void)
*
* === What's Here
*
- * First, what's elsewhere. \Class +ENV+:
+ * First, what's elsewhere. Class +ENV+:
*
* - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
* - Extends {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
diff --git a/io.c b/io.c
index d4a4aaae45..92fe5322da 100644
--- a/io.c
+++ b/io.c
@@ -15006,9 +15006,9 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
/*
* An instance of class \IO (commonly called a _stream_)
* represents an input/output stream in the underlying operating system.
- * \Class \IO is the basis for input and output in Ruby.
+ * Class \IO is the basis for input and output in Ruby.
*
- * \Class File is the only class in the Ruby core that is a subclass of \IO.
+ * Class File is the only class in the Ruby core that is a subclass of \IO.
* Some classes in the Ruby standard library are also subclasses of \IO;
* these include TCPSocket and UDPSocket.
*
@@ -15017,7 +15017,7 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
* found in ARGV (or found in STDIN if ARGV is empty).
* ARGF is not itself a subclass of \IO.
*
- * \Class StringIO provides an IO-like stream that handles a String.
+ * Class StringIO provides an IO-like stream that handles a String.
* StringIO is not itself a subclass of \IO.
*
* Important objects based on \IO include:
@@ -15155,12 +15155,12 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
*
* == Line \IO
*
- * \Class \IO supports line-oriented
+ * Class \IO supports line-oriented
* {input}[rdoc-ref:IO@Line+Input] and {output}[rdoc-ref:IO@Line+Output]
*
* === Line Input
*
- * \Class \IO supports line-oriented input for
+ * Class \IO supports line-oriented input for
* {files}[rdoc-ref:IO@File+Line+Input] and {IO streams}[rdoc-ref:IO@Stream+Line+Input]
*
* ==== \File Line Input
@@ -15433,7 +15433,7 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
*
* == What's Here
*
- * First, what's elsewhere. \Class \IO:
+ * First, what's elsewhere. Class \IO:
*
* - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
* - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
diff --git a/numeric.c b/numeric.c
index 485575f871..affd60a182 100644
--- a/numeric.c
+++ b/numeric.c
@@ -930,7 +930,7 @@ num_negative_p(VALUE num)
*
* == What's Here
*
- * First, what's elsewhere. \Class \Float:
+ * First, what's elsewhere. Class \Float:
*
* - Inherits from
* {class Numeric}[rdoc-ref:Numeric@What-27s+Here]
@@ -3546,7 +3546,7 @@ rb_num2ull(VALUE val)
*
* == What's Here
*
- * First, what's elsewhere. \Class \Integer:
+ * First, what's elsewhere. Class \Integer:
*
* - Inherits from
* {class Numeric}[rdoc-ref:Numeric@What-27s+Here]
@@ -6190,7 +6190,7 @@ int_s_try_convert(VALUE self, VALUE num)
*
* == What's Here
*
- * First, what's elsewhere. \Class \Numeric:
+ * First, what's elsewhere. Class \Numeric:
*
* - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
* - Includes {module Comparable}[rdoc-ref:Comparable@What-27s+Here].
diff --git a/object.c b/object.c
index 97f2b0c8af..8fe131c18a 100644
--- a/object.c
+++ b/object.c
@@ -4091,7 +4091,7 @@ rb_f_loop_size(VALUE self, VALUE args, VALUE eobj)
*
* BasicObject.superclass # => nil
*
- * \Class +BasicObject+ can be used to create an object hierarchy
+ * Class +BasicObject+ can be used to create an object hierarchy
* (e.g., class Delegator) that is independent of Ruby's object hierarchy.
* Such objects:
*
@@ -4162,7 +4162,7 @@ rb_f_loop_size(VALUE self, VALUE args, VALUE eobj)
*
* == What's Here
*
- * First, what's elsewhere. \Class \Object:
+ * First, what's elsewhere. Class \Object:
*
* - Inherits from {class BasicObject}[rdoc-ref:BasicObject@What-27s+Here].
* - Includes {module Kernel}[rdoc-ref:Kernel@What-27s+Here].
@@ -4282,7 +4282,7 @@ InitVM_Object(void)
*
* == What's Here
*
- * \Module \Kernel provides methods that are useful for:
+ * Module \Kernel provides methods that are useful for:
*
* - {Converting}[rdoc-ref:Kernel@Converting]
* - {Querying}[rdoc-ref:Kernel@Querying]
diff --git a/process.c b/process.c
index 1d56fa2f1c..8956a8e780 100644
--- a/process.c
+++ b/process.c
@@ -8762,7 +8762,7 @@ proc_warmup(VALUE _)
/*
* Document-module: Process
*
- * \Module +Process+ represents a process in the underlying operating system.
+ * Module +Process+ represents a process in the underlying operating system.
* Its methods support management of the current process and its child processes.
*
* == Process Creation
@@ -8782,7 +8782,7 @@ proc_warmup(VALUE _)
* returns +true+, +false+, or +nil+.
* - Method Kernel#` executes a given command-line (string) in a subshell;
* returns its $stdout string.
- * - \Module Open3 supports creating child processes
+ * - Module Open3 supports creating child processes
* with access to their $stdin, $stdout, and $stderr streams.
*
* === Execution Environment
diff --git a/ractor.rb b/ractor.rb
index ba9cfe14f3..8af54f73d4 100644
--- a/ractor.rb
+++ b/ractor.rb
@@ -155,7 +155,7 @@
# Notice that even +inspect+ (and more basic methods like <tt>__id__</tt>) is inaccessible
# on a moved object.
#
-# Class and Module objects are shareable so the class/module definitions are shared between ractors.
+# +Class+ and +Module+ objects are shareable so the class/module definitions are shared between ractors.
# \Ractor objects are also shareable. All operations on shareable objects are thread-safe, so the thread-safety property
# will be kept. We can not define mutable shareable objects in Ruby, but C extensions can introduce them.
#
diff --git a/range.c b/range.c
index 70df606bb9..66af4f9d90 100644
--- a/range.c
+++ b/range.c
@@ -2704,7 +2704,7 @@ range_overlap(VALUE range, VALUE other)
*
* == What's Here
*
- * First, what's elsewhere. \Class \Range:
+ * First, what's elsewhere. Class \Range:
*
* - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
* - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
diff --git a/string.c b/string.c
index d7318c7916..2b1c1f8e94 100644
--- a/string.c
+++ b/string.c
@@ -11963,7 +11963,7 @@ rb_str_unicode_normalized_p(int argc, VALUE *argv, VALUE str)
*
* == What's Here
*
- * First, what's elsewhere. \Class +Symbol+:
+ * First, what's elsewhere. Class +Symbol+:
*
* - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
* - Includes {module Comparable}[rdoc-ref:Comparable@What-27s+Here].
diff --git a/string.rb b/string.rb
index 1f204d843c..f925cc5833 100644
--- a/string.rb
+++ b/string.rb
@@ -300,7 +300,7 @@
#
# == What's Here
#
-# First, what's elsewhere. \Class +String+:
+# First, what's elsewhere. Class +String+:
#
# - Inherits from the {Object class}[rdoc-ref:Object@What-27s+Here].
# - Includes the {Comparable module}[rdoc-ref:Comparable@What-27s+Here].
diff --git a/struct.c b/struct.c
index b2fe346f76..45f90c414c 100644
--- a/struct.c
+++ b/struct.c
@@ -532,7 +532,7 @@ rb_struct_define_under(VALUE outer, const char *name, ...)
* Foo = Struct.new('Foo', :foo, :bar) # => Struct::Foo
* f = Foo.new(0, 1) # => #<struct Struct::Foo foo=0, bar=1>
*
- * <b>\Class Name</b>
+ * <b>Class Name</b>
*
* With string argument +class_name+,
* returns a new subclass of +Struct+ named <tt>Struct::<em>class_name</em></tt>:
@@ -1552,7 +1552,7 @@ rb_struct_dig(int argc, VALUE *argv, VALUE self)
/*
* Document-class: Data
*
- * \Class \Data provides a convenient way to define simple classes
+ * Class \Data provides a convenient way to define simple classes
* for value-alike objects.
*
* The simplest example of usage:
@@ -2065,7 +2065,7 @@ rb_data_inspect(VALUE s)
/*
* Document-class: Struct
*
- * \Class \Struct provides a convenient way to create a simple class
+ * Class \Struct provides a convenient way to create a simple class
* that can store and fetch values.
*
* This example creates a subclass of +Struct+, <tt>Struct::Customer</tt>;
@@ -2105,7 +2105,7 @@ rb_data_inspect(VALUE s)
*
* == What's Here
*
- * First, what's elsewhere. \Class \Struct:
+ * First, what's elsewhere. Class \Struct:
*
* - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
* - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
diff --git a/timev.rb b/timev.rb
index fe681845de..5d3af0b559 100644
--- a/timev.rb
+++ b/timev.rb
@@ -162,7 +162,7 @@
#
# == What's Here
#
-# First, what's elsewhere. \Class +Time+:
+# First, what's elsewhere. Class +Time+:
#
# - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
# - Includes {module Comparable}[rdoc-ref:Comparable@What-27s+Here].