Skip to content

Commit b4ec22f

Browse files
committed
[DOC] Exclude 'Method' from RDoc's autolinking
1 parent d441d35 commit b4ec22f

20 files changed

+70
-71
lines changed

.rdoc_options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ exclude:
1313
- .gemspec
1414

1515
autolink_excluded_words:
16+
- Method
1617
- Process
1718
- Ruby
1819
- Set

array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8302,7 +8302,7 @@ rb_ary_deconstruct(VALUE ary)
83028302
* %i[foo bar baz] # => [:foo, :bar, :baz]
83038303
* %i[1 % *] # => [:"1", :%, :*]
83048304
*
8305-
* - \Method Kernel#Array:
8305+
* - Method Kernel#Array:
83068306
*
83078307
* Array(["a", "b"]) # => ["a", "b"]
83088308
* Array(1..5) # => [1, 2, 3, 4, 5]
@@ -8311,7 +8311,7 @@ rb_ary_deconstruct(VALUE ary)
83118311
* Array(1) # => [1]
83128312
* Array({:a => "a", :b => "b"}) # => [[:a, "a"], [:b, "b"]]
83138313
*
8314-
* - \Method Array.new:
8314+
* - Method Array.new:
83158315
*
83168316
* Array.new # => []
83178317
* Array.new(3) # => [nil, nil, nil]

complex.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2474,9 +2474,9 @@ float_arg(VALUE self)
24742474
* You can create a \Complex object from rectangular coordinates with:
24752475
*
24762476
* - A {complex literal}[rdoc-ref:syntax/literals.rdoc@Complex+Literals].
2477-
* - \Method Complex.rect.
2478-
* - \Method Kernel#Complex, either with numeric arguments or with certain string arguments.
2479-
* - \Method String#to_c, for certain strings.
2477+
* - Method Complex.rect.
2478+
* - Method Kernel#Complex, either with numeric arguments or with certain string arguments.
2479+
* - Method String#to_c, for certain strings.
24802480
*
24812481
* Note that each of the stored parts may be a an instance one of the classes
24822482
* Complex, Float, Integer, or Rational;
@@ -2502,9 +2502,9 @@ float_arg(VALUE self)
25022502
*
25032503
* You can create a \Complex object from polar coordinates with:
25042504
*
2505-
* - \Method Complex.polar.
2506-
* - \Method Kernel#Complex, with certain string arguments.
2507-
* - \Method String#to_c, for certain strings.
2505+
* - Method Complex.polar.
2506+
* - Method Kernel#Complex, with certain string arguments.
2507+
* - Method String#to_c, for certain strings.
25082508
*
25092509
* Note that each of the stored parts may be a an instance one of the classes
25102510
* Complex, Float, Integer, or Rational;

dir.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
# The stream has a _position_, which is the index of an entry in the directory:
4747
#
4848
# - The initial position is zero (before the first entry).
49-
# - \Method #tell (aliased as #pos) returns the position.
50-
# - \Method #pos= sets the position (but ignores a value outside the stream),
49+
# - Method #tell (aliased as #pos) returns the position.
50+
# - Method #pos= sets the position (but ignores a value outside the stream),
5151
# and returns the position.
52-
# - \Method #seek is like #pos=, but returns +self+ (convenient for chaining).
53-
# - \Method #read, if not at end-of-stream, reads the next entry and increments
52+
# - Method #seek is like #pos=, but returns +self+ (convenient for chaining).
53+
# - Method #read, if not at end-of-stream, reads the next entry and increments
5454
# the position;
5555
# if at end-of-stream, does not increment the position.
56-
# - \Method #rewind sets the position to zero.
56+
# - Method #rewind sets the position to zero.
5757
#
5858
# Examples (using the {simple file tree}[rdoc-ref:Dir@About+the+Examples]):
5959
#

doc/_regexp.rdoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ A regular expression may be created with:
7878
%r(foo) # => /foo/
7979
%r<foo> # => /foo/
8080

81-
- \Method Regexp.new.
81+
- Method Regexp.new.
8282

83-
== \Method <tt>match</tt>
83+
== Method <tt>match</tt>
8484

8585
Each of the methods Regexp#match, String#match, and Symbol#match
8686
returns a MatchData object if a match was found, +nil+ otherwise;
@@ -99,7 +99,7 @@ each also sets {global variables}[rdoc-ref:Regexp@Global+Variables]:
9999
'foo bar' =~ /bar/ # => 4
100100
/baz/ =~ 'foo bar' # => nil
101101

102-
== \Method <tt>match?</tt>
102+
== Method <tt>match?</tt>
103103

104104
Each of the methods Regexp#match?, String#match?, and Symbol#match?
105105
returns +true+ if a match was found, +false+ otherwise;
@@ -477,7 +477,7 @@ Each alternative is a subexpression, and may be composed of other subexpressions
477477
re.match('bar') # => #<MatchData "b" 1:"b">
478478
re.match('ooz') # => #<MatchData "z" 1:"z">
479479

480-
\Method Regexp.union provides a convenient way to construct
480+
Method Regexp.union provides a convenient way to construct
481481
a regexp with alternatives.
482482

483483
=== Quantifiers
@@ -682,7 +682,7 @@ the captured substrings are assigned to local variables with corresponding names
682682
dollars # => "3"
683683
cents # => "67"
684684

685-
\Method Regexp#named_captures returns a hash of the capture names and substrings;
685+
Method Regexp#named_captures returns a hash of the capture names and substrings;
686686
method Regexp#names returns an array of the capture names.
687687

688688
==== Atomic Grouping
@@ -1057,7 +1057,7 @@ Example:
10571057
re.match('tEst') # => #<MatchData "tEst">
10581058
re.match('tEST') # => nil
10591059

1060-
\Method Regexp#options returns an integer whose value showing
1060+
Method Regexp#options returns an integer whose value showing
10611061
the settings for case-insensitivity mode, multiline mode, and extended mode.
10621062

10631063
=== Case-Insensitive Mode
@@ -1071,7 +1071,7 @@ Modifier +i+ enables case-insensitive mode:
10711071
/foo/i.match('FOO')
10721072
# => #<MatchData "FOO">
10731073

1074-
\Method Regexp#casefold? returns whether the mode is case-insensitive.
1074+
Method Regexp#casefold? returns whether the mode is case-insensitive.
10751075

10761076
=== Multiline Mode
10771077

doc/encodings.rdoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Other characters, such as the Euro symbol, are multi-byte:
3636

3737
Ruby encodings are defined by constants in class \Encoding.
3838
There can be only one instance of \Encoding for each of these constants.
39-
\Method Encoding.list returns an array of \Encoding objects (one for each constant):
39+
Method Encoding.list returns an array of \Encoding objects (one for each constant):
4040

4141
Encoding.list.size # => 103
4242
Encoding.list.first.class # => Encoding
@@ -45,7 +45,7 @@ There can be only one instance of \Encoding for each of these constants.
4545

4646
=== Names and Aliases
4747

48-
\Method Encoding#name returns the name of an \Encoding:
48+
Method Encoding#name returns the name of an \Encoding:
4949

5050
Encoding::ASCII_8BIT.name # => "ASCII-8BIT"
5151
Encoding::WINDOWS_31J.name # => "Windows-31J"
@@ -58,29 +58,29 @@ method Encoding#names returns an array containing the name and all aliases:
5858
Encoding::WINDOWS_31J.names
5959
#=> ["Windows-31J", "CP932", "csWindows31J", "SJIS", "PCK"]
6060

61-
\Method Encoding.aliases returns a hash of all alias/name pairs:
61+
Method Encoding.aliases returns a hash of all alias/name pairs:
6262

6363
Encoding.aliases.size # => 71
6464
Encoding.aliases.take(3)
6565
# => [["BINARY", "ASCII-8BIT"], ["CP437", "IBM437"], ["CP720", "IBM720"]]
6666

67-
\Method Encoding.name_list returns an array of all the encoding names and aliases:
67+
Method Encoding.name_list returns an array of all the encoding names and aliases:
6868

6969
Encoding.name_list.size # => 175
7070
Encoding.name_list.take(3)
7171
# => ["ASCII-8BIT", "UTF-8", "US-ASCII"]
7272

73-
\Method +name_list+ returns more entries than method +list+
73+
Method +name_list+ returns more entries than method +list+
7474
because it includes both the names and their aliases.
7575

76-
\Method Encoding.find returns the \Encoding for a given name or alias, if it exists:
76+
Method Encoding.find returns the \Encoding for a given name or alias, if it exists:
7777

7878
Encoding.find("US-ASCII") # => #<Encoding:US-ASCII>
7979
Encoding.find("US-ASCII").class # => Encoding
8080

8181
=== Default Encodings
8282

83-
\Method Encoding.find, above, also returns a default \Encoding
83+
Method Encoding.find, above, also returns a default \Encoding
8484
for each of these special names:
8585

8686
- +external+: the default external \Encoding:
@@ -100,27 +100,27 @@ for each of these special names:
100100

101101
Encoding.find("filesystem") # => #<Encoding:UTF-8>
102102

103-
\Method Encoding.default_external returns the default external \Encoding:
103+
Method Encoding.default_external returns the default external \Encoding:
104104

105105
Encoding.default_external # => #<Encoding:UTF-8>
106106

107-
\Method Encoding.default_external= sets that value:
107+
Method Encoding.default_external= sets that value:
108108

109109
Encoding.default_external = 'US-ASCII' # => "US-ASCII"
110110
Encoding.default_external # => #<Encoding:US-ASCII>
111111

112-
\Method Encoding.default_internal returns the default internal \Encoding:
112+
Method Encoding.default_internal returns the default internal \Encoding:
113113

114114
Encoding.default_internal # => nil
115115

116-
\Method Encoding.default_internal= sets the default internal \Encoding:
116+
Method Encoding.default_internal= sets the default internal \Encoding:
117117

118118
Encoding.default_internal = 'US-ASCII' # => "US-ASCII"
119119
Encoding.default_internal # => #<Encoding:US-ASCII>
120120

121121
=== Compatible Encodings
122122

123-
\Method Encoding.compatible? returns whether two given objects are encoding-compatible
123+
Method Encoding.compatible? returns whether two given objects are encoding-compatible
124124
(that is, whether they can be concatenated);
125125
returns the \Encoding of the concatenated string, or +nil+ if incompatible:
126126

@@ -248,7 +248,7 @@ For an \IO or \File object, the external encoding may be set by:
248248

249249
For an \IO, \File, \ARGF, or \StringIO object, the external encoding may be set by:
250250

251-
- \Methods +set_encoding+ or (except for \ARGF) +set_encoding_by_bom+.
251+
- Methods +set_encoding+ or (except for \ARGF) +set_encoding_by_bom+.
252252

253253
=== Internal \Encoding
254254

@@ -274,7 +274,7 @@ For an \IO or \File object, the internal encoding may be set by:
274274

275275
For an \IO, \File, \ARGF, or \StringIO object, the internal encoding may be set by:
276276

277-
- \Method +set_encoding+.
277+
- Method +set_encoding+.
278278

279279
== Script \Encoding
280280

doc/exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ not just the part after the point of failure.
409409

410410
## Raising an \Exception
411411

412-
\Method Kernel#raise raises an exception.
412+
Method Kernel#raise raises an exception.
413413

414414
## Custom Exceptions
415415

doc/packed_data.rdoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ These tables summarize the directives for packing and unpacking.
103103

104104
Certain Ruby core methods deal with packing and unpacking data:
105105

106-
- \Method Array#pack:
106+
- Method Array#pack:
107107
Formats each element in array +self+ into a binary string;
108108
returns that string.
109-
- \Method String#unpack:
109+
- Method String#unpack:
110110
Extracts data from string +self+,
111111
forming objects that become the elements of a new array;
112112
returns that array.
113-
- \Method String#unpack1:
113+
- Method String#unpack1:
114114
Does the same, but unpacks and returns only the first extracted object.
115115

116116
Each of these methods accepts a string +template+,
@@ -165,9 +165,9 @@ If elements don't fit the provided directive, only least significant bits are en
165165

166166
[257].pack("C").unpack("C") # => [1]
167167

168-
== Packing \Method
168+
== Packing Method
169169

170-
\Method Array#pack accepts optional keyword argument
170+
Method Array#pack accepts optional keyword argument
171171
+buffer+ that specifies the target string (instead of a new string):
172172

173173
[65, 66].pack('C*', buffer: 'foo') # => "fooAB"

doc/syntax/calling_methods.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ NoMethodError.
3030
You may also use <code>::</code> to designate a receiver, but this is rarely
3131
used due to the potential for confusion with <code>::</code> for namespaces.
3232

33-
=== Chaining \Method Calls
33+
=== Chaining Method Calls
3434

3535
You can "chain" method calls by immediately following one method call with another.
3636

enum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3912,7 +3912,7 @@ chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
39123912
* e.next # => [2, [6, 7, 8]]
39133913
* e.next # => [3, [9, 10]]
39143914
*
3915-
* \Method +chunk+ is especially useful for an enumerable that is already sorted.
3915+
* Method +chunk+ is especially useful for an enumerable that is already sorted.
39163916
* This example counts words for each initial letter in a large array of words:
39173917
*
39183918
* # Get sorted words from a web page.

0 commit comments

Comments
 (0)