aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--array.c20
-rw-r--r--enum.c12
-rw-r--r--file.c8
-rw-r--r--hash.c98
-rw-r--r--io.c126
-rw-r--r--numeric.c22
-rw-r--r--object.c30
-rw-r--r--range.c10
-rw-r--r--string.c30
-rw-r--r--struct.c14
10 files changed, 185 insertions, 185 deletions
diff --git a/array.c b/array.c
index 630dbf424c..55987f52b1 100644
--- a/array.c
+++ b/array.c
@@ -8086,16 +8086,16 @@ rb_ary_deconstruct(VALUE ary)
*
* Here, class \Array provides methods that are useful for:
*
- * - {Creating an Array}[#class-Array-label-Methods+for+Creating+an+Array]
- * - {Querying}[#class-Array-label-Methods+for+Querying]
- * - {Comparing}[#class-Array-label-Methods+for+Comparing]
- * - {Fetching}[#class-Array-label-Methods+for+Fetching]
- * - {Assigning}[#class-Array-label-Methods+for+Assigning]
- * - {Deleting}[#class-Array-label-Methods+for+Deleting]
- * - {Combining}[#class-Array-label-Methods+for+Combining]
- * - {Iterating}[#class-Array-label-Methods+for+Iterating]
- * - {Converting}[#class-Array-label-Methods+for+Converting]
- * - {And more....}[#class-Array-label-Other+Methods]
+ * - {Creating an Array}[rdoc-ref:Array@Methods+for+Creating+an+Array]
+ * - {Querying}[rdoc-ref:Array@Methods+for+Querying]
+ * - {Comparing}[rdoc-ref:Array@Methods+for+Comparing]
+ * - {Fetching}[rdoc-ref:Array@Methods+for+Fetching]
+ * - {Assigning}[rdoc-ref:Array@Methods+for+Assigning]
+ * - {Deleting}[rdoc-ref:Array@Methods+for+Deleting]
+ * - {Combining}[rdoc-ref:Array@Methods+for+Combining]
+ * - {Iterating}[rdoc-ref:Array@Methods+for+Iterating]
+ * - {Converting}[rdoc-ref:Array@Methods+for+Converting]
+ * - {And more....}[rdoc-ref:Array@Other+Methods]
*
* === Methods for Creating an Array
*
diff --git a/enum.c b/enum.c
index 5912280840..519d8873f6 100644
--- a/enum.c
+++ b/enum.c
@@ -4650,12 +4650,12 @@ enum_compact(VALUE obj)
* == What's Here
*
* \Module \Enumerable provides methods that are useful to a collection class for:
- * - {Querying}[#module-Enumerable-label-Methods+for+Querying]
- * - {Fetching}[#module-Enumerable-label-Methods+for+Fetching]
- * - {Searching}[#module-Enumerable-label-Methods+for+Searching]
- * - {Sorting}[#module-Enumerable-label-Methods+for+Sorting]
- * - {Iterating}[#module-Enumerable-label-Methods+for+Iterating]
- * - {And more....}[#module-Enumerable-label-Other+Methods]
+ * - {Querying}[rdoc-ref:Enumerable@Methods+for+Querying]
+ * - {Fetching}[rdoc-ref:Enumerable@Methods+for+Fetching]
+ * - {Searching}[rdoc-ref:Enumerable@Methods+for+Searching]
+ * - {Sorting}[rdoc-ref:Enumerable@Methods+for+Sorting]
+ * - {Iterating}[rdoc-ref:Enumerable@Methods+for+Iterating]
+ * - {And more....}[rdoc-ref:Enumerable@Other+Methods]
*
* === Methods for Querying
*
diff --git a/file.c b/file.c
index 1fb661d3ef..2cd011375a 100644
--- a/file.c
+++ b/file.c
@@ -6584,10 +6584,10 @@ const char ruby_null_device[] =
*
* Here, class \File provides methods that are useful for:
*
- * - {Creating}[#class-File-label-Creating]
- * - {Querying}[#class-File-label-Querying]
- * - {Settings}[#class-File-label-Settings]
- * - {Other}[#class-File-label-Other]
+ * - {Creating}[rdoc-ref:File@Creating]
+ * - {Querying}[rdoc-ref:File@Querying]
+ * - {Settings}[rdoc-ref:File@Settings]
+ * - {Other}[rdoc-ref:File@Other]
*
* === Creating
*
diff --git a/hash.c b/hash.c
index ece9adee06..08e08935d2 100644
--- a/hash.c
+++ b/hash.c
@@ -1775,7 +1775,7 @@ set_proc_default(VALUE hash, VALUE proc)
* Returns a new empty \Hash object.
*
* The initial default value and initial default proc for the new hash
- * depend on which form above was used. See {Default Values}[#class-Hash-label-Default+Values].
+ * depend on which form above was used. See {Default Values}[rdoc-ref:Hash@Default+Values].
*
* If neither an argument nor a block given,
* initializes both the default value and the default proc to <tt>nil</tt>:
@@ -2008,7 +2008,7 @@ rb_hash_rehash_i(VALUE key, VALUE value, VALUE arg)
*
* The hash table becomes invalid if the hash value of a key
* has changed after the entry was created.
- * See {Modifying an Active Hash Key}[#class-Hash-label-Modifying+an+Active+Hash+Key].
+ * See {Modifying an Active Hash Key}[rdoc-ref:Hash@Modifying+an+Active+Hash+Key].
*/
VALUE
@@ -2092,7 +2092,7 @@ rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval)
* h[:foo] # => 0
*
* If +key+ is not found, returns a default value
- * (see {Default Values}[#class-Hash-label-Default+Values]):
+ * (see {Default Values}[rdoc-ref:Hash@Default+Values]):
* h = {foo: 0, bar: 1, baz: 2}
* h[:nosuch] # => nil
*/
@@ -2201,7 +2201,7 @@ rb_hash_fetch(VALUE hash, VALUE key)
*
* Returns the default value for the given +key+.
* The returned value will be determined either by the default proc or by the default value.
- * See {Default Values}[#class-Hash-label-Default+Values].
+ * See {Default Values}[rdoc-ref:Hash@Default+Values].
*
* With no argument, returns the current default value:
* h = {}
@@ -2238,7 +2238,7 @@ rb_hash_default(int argc, VALUE *argv, VALUE hash)
* h.default = false # => false
* h.default # => false
*
- * See {Default Values}[#class-Hash-label-Default+Values].
+ * See {Default Values}[rdoc-ref:Hash@Default+Values].
*/
static VALUE
@@ -2254,7 +2254,7 @@ rb_hash_set_default(VALUE hash, VALUE ifnone)
* hash.default_proc -> proc or nil
*
* Returns the default proc for +self+
- * (see {Default Values}[#class-Hash-label-Default+Values]):
+ * (see {Default Values}[rdoc-ref:Hash@Default+Values]):
* h = {}
* h.default_proc # => nil
* h.default_proc = proc {|hash, key| "Default value for #{key}" }
@@ -2275,7 +2275,7 @@ rb_hash_default_proc(VALUE hash)
* hash.default_proc = proc -> proc
*
* Sets the default proc for +self+ to +proc+:
- * (see {Default Values}[#class-Hash-label-Default+Values]):
+ * (see {Default Values}[rdoc-ref:Hash@Default+Values]):
* h = {}
* h.default_proc # => nil
* h.default_proc = proc { |hash, key| "Default value for #{key}" }
@@ -2322,7 +2322,7 @@ key_i(VALUE key, VALUE value, VALUE arg)
* hash.key(value) -> key or nil
*
* Returns the key for the first-found entry with the given +value+
- * (see {Entry Order}[#class-Hash-label-Entry+Order]):
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
* h = {foo: 0, bar: 2, baz: 2}
* h.key(0) # => :foo
* h.key(2) # => :bar
@@ -2458,7 +2458,7 @@ shift_i_safe(VALUE key, VALUE value, VALUE arg)
* hash.shift -> [key, value] or nil
*
* Removes the first hash entry
- * (see {Entry Order}[#class-Hash-label-Entry+Order]);
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]);
* returns a 2-element \Array containing the removed key and value:
* h = {foo: 0, bar: 1, baz: 2}
* h.shift # => [:foo, 0]
@@ -2680,7 +2680,7 @@ rb_hash_except(int argc, VALUE *argv, VALUE hash)
* h = {foo: 0, bar: 1, baz: 2}
* h.values_at(:baz, :foo) # => [2, 0]
*
- * The {default values}[#class-Hash-label-Default+Values] are returned
+ * The {default values}[rdoc-ref:Hash@Default+Values] are returned
* for any keys that are not found:
* h.values_at(:hello, :foo) # => [nil, 0]
*/
@@ -2902,7 +2902,7 @@ NOINSERT_UPDATE_CALLBACK(hash_aset_str)
*
* If the given +key+ exists, replaces its value with the given +value+;
* the ordering is not affected
- * (see {Entry Order}[#class-Hash-label-Entry+Order]):
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
* h = {foo: 0, bar: 1}
* h[:foo] = 2 # => 2
* h.store(:bar, 3) # => 3
@@ -2910,7 +2910,7 @@ NOINSERT_UPDATE_CALLBACK(hash_aset_str)
*
* If +key+ does not exist, adds the +key+ and +value+;
* the new entry is last in the order
- * (see {Entry Order}[#class-Hash-label-Entry+Order]):
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
* h = {foo: 0, bar: 1}
* h[:baz] = 2 # => 2
* h.store(:bat, 3) # => 3
@@ -3872,7 +3872,7 @@ rb_hash_invert_i(VALUE key, VALUE value, VALUE hash)
* h1 # => {0=>:foo, 1=>:bar, 2=>:baz}
*
* Overwrites any repeated new keys:
- * (see {Entry Order}[#class-Hash-label-Entry+Order]):
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
* h = {foo: 0, bar: 0, baz: 0}
* h.invert # => {0=>:baz}
*/
@@ -4202,7 +4202,7 @@ rassoc_i(VALUE key, VALUE val, VALUE arg)
*
* Returns a new 2-element \Array consisting of the key and value
* of the first-found entry whose value is <tt>==</tt> to value
- * (see {Entry Order}[#class-Hash-label-Entry+Order]):
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
* h = {foo: 0, bar: 1, baz: 1}
* h.rassoc(1) # => [:bar, 1]
*
@@ -4564,7 +4564,7 @@ rb_hash_any_p(int argc, VALUE *argv, VALUE hash)
* h = {foo: {bar: [:a, :b, :c]}}
* h.dig(:foo, :bar, 2) # => :c
*
- * This method will use the {default values}[#class-Hash-label-Default+Values]
+ * This method will use the {default values}[rdoc-ref:Hash@Default+Values]
* for keys that are not present:
* h = {foo: {bar: [:a, :b, :c]}}
* h.dig(:hello) # => nil
@@ -4968,7 +4968,7 @@ env_delete(VALUE name)
* ENV.delete('foo') { |name| raise 'ignored' } # => "0"
*
* Raises an exception if +name+ is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_delete_m(VALUE obj, VALUE name)
@@ -4990,7 +4990,7 @@ env_delete_m(VALUE obj, VALUE name)
* Returns +nil+ if the named variable does not exist.
*
* Raises an exception if +name+ is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
rb_f_getenv(VALUE obj, VALUE name)
@@ -5023,7 +5023,7 @@ rb_f_getenv(VALUE obj, VALUE name)
* and neither default value nor block is given:
* ENV.fetch('foo') # Raises KeyError (key not found: "foo")
* Raises an exception if +name+ is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_fetch(int argc, VALUE *argv, VALUE _)
@@ -5338,7 +5338,7 @@ ruby_unsetenv(const char *name)
*
* Creates, updates, or deletes the named environment variable, returning the value.
* Both +name+ and +value+ may be instances of String.
- * See {Valid Names and Values}[#class-ENV-label-Valid+Names+and+Values].
+ * See {Valid Names and Values}[rdoc-ref:ENV@Valid+Names+and+Values].
*
* - If the named environment variable does not exist:
* - If +value+ is +nil+, does nothing.
@@ -5371,7 +5371,7 @@ ruby_unsetenv(const char *name)
* ENV.include?('bar') # => false
*
* Raises an exception if +name+ or +value+ is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_aset_m(VALUE obj, VALUE nm, VALUE val)
@@ -5434,7 +5434,7 @@ env_keys(int raw)
* ENV.replace('foo' => '0', 'bar' => '1')
* ENV.keys # => ['bar', 'foo']
* The order of the names is OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*
* Returns the empty Array if ENV is empty.
*/
@@ -5528,7 +5528,7 @@ env_values(void)
* ENV.replace('foo' => '0', 'bar' => '1')
* ENV.values # => ['1', '0']
* The order of the values is OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*
* Returns the empty Array if ENV is empty.
*/
@@ -5715,7 +5715,7 @@ env_delete_if(VALUE ehash)
* Returns an empty \Array if no names given.
*
* Raises an exception if any name is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_values_at(int argc, VALUE *argv, VALUE _)
@@ -5871,7 +5871,7 @@ env_keep_if(VALUE ehash)
* ENV.slice('foo', 'baz') # => {"foo"=>"0", "baz"=>"2"}
* ENV.slice('baz', 'foo') # => {"baz"=>"2", "foo"=>"0"}
* Raises an exception if any of the +names+ is invalid
- * (see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]):
+ * (see {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values]):
* ENV.slice('foo', 'bar', :bat) # Raises TypeError (no implicit conversion of Symbol into String)
*/
static VALUE
@@ -6204,7 +6204,7 @@ env_has_value(VALUE dmy, VALUE obj)
* ENV.replace('foo' => '0', 'bar' => '0')
* ENV.rassoc('0') # => ["bar", "0"]
* The order in which environment variables are examined is OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*
* Returns +nil+ if there is no such environment variable.
*/
@@ -6247,13 +6247,13 @@ env_rassoc(VALUE dmy, VALUE obj)
* ENV.replace('foo' => '0', 'bar' => '0')
* ENV.key('0') # => "foo"
* The order in which environment variables are examined is OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*
* Returns +nil+ if there is no such value.
*
* Raises an exception if +value+ is invalid:
* ENV.key(Object.new) # raises TypeError (no implicit conversion of Object into String)
- * See {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_key(VALUE dmy, VALUE value)
@@ -6430,7 +6430,7 @@ env_freeze(VALUE self)
* ENV.shift # => ['bar', '1']
* ENV.to_hash # => {'foo' => '0'}
* Exactly which environment variable is "first" is OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*
* Returns +nil+ if the environment is empty.
*/
@@ -6476,7 +6476,7 @@ env_shift(VALUE _)
* ENV.invert # => {"0"=>"foo"}
* Note that the order of the ENV processing is OS-dependent,
* which means that the order of overwriting is also OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*/
static VALUE
env_invert(VALUE _)
@@ -6526,7 +6526,7 @@ env_replace_i(VALUE key, VALUE val, VALUE keys)
* ENV.to_hash # => {"bar"=>"1", "foo"=>"0"}
*
* Raises an exception if a name or value is invalid
- * (see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]):
+ * (see {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values]):
* ENV.replace('foo' => '0', :bar => '1') # Raises TypeError (no implicit conversion of Symbol into String)
* ENV.replace('foo' => '0', 'bar' => 1) # Raises TypeError (no implicit conversion of Integer into String)
* ENV.to_hash # => {"bar"=>"1", "foo"=>"0"}
@@ -6588,14 +6588,14 @@ env_update_block_i(VALUE key, VALUE val, VALUE _)
* the block's return value becomes the new name:
* ENV.merge!('foo' => '5') { |name, env_val, hash_val | env_val + hash_val } # => {"bar"=>"1", "foo"=>"45"}
* Raises an exception if a name or value is invalid
- * (see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]);
+ * (see {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values]);
* ENV.replace('foo' => '0', 'bar' => '1')
* ENV.merge!('foo' => '6', :bar => '7', 'baz' => '9') # Raises TypeError (no implicit conversion of Symbol into String)
* ENV # => {"bar"=>"1", "foo"=>"6"}
* ENV.merge!('foo' => '7', 'bar' => 8, 'baz' => '9') # Raises TypeError (no implicit conversion of Integer into String)
* ENV # => {"bar"=>"1", "foo"=>"7"}
* Raises an exception if the block returns an invalid name:
- * (see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]):
+ * (see {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values]):
* ENV.merge!('bat' => '8', 'foo' => '9') { |name, env_val, hash_val | 10 } # Raises TypeError (no implicit conversion of Integer into String)
* ENV # => {"bar"=>"1", "bat"=>"8", "foo"=>"7"}
*
@@ -7020,17 +7020,17 @@ static const rb_data_type_t env_data_type = {
*
* Here, class \Hash provides methods that are useful for:
*
- * - {Creating a Hash}[#class-Hash-label-Methods+for+Creating+a+Hash]
- * - {Setting Hash State}[#class-Hash-label-Methods+for+Setting+Hash+State]
- * - {Querying}[#class-Hash-label-Methods+for+Querying]
- * - {Comparing}[#class-Hash-label-Methods+for+Comparing]
- * - {Fetching}[#class-Hash-label-Methods+for+Fetching]
- * - {Assigning}[#class-Hash-label-Methods+for+Assigning]
- * - {Deleting}[#class-Hash-label-Methods+for+Deleting]
- * - {Iterating}[#class-Hash-label-Methods+for+Iterating]
- * - {Converting}[#class-Hash-label-Methods+for+Converting]
- * - {Transforming Keys and Values}[#class-Hash-label-Methods+for+Transforming+Keys+and+Values]
- * - {And more....}[#class-Hash-label-Other+Methods]
+ * - {Creating a Hash}[rdoc-ref:Hash@Methods+for+Creating+a+Hash]
+ * - {Setting Hash State}[rdoc-ref:Hash@Methods+for+Setting+Hash+State]
+ * - {Querying}[rdoc-ref:Hash@Methods+for+Querying]
+ * - {Comparing}[rdoc-ref:Hash@Methods+for+Comparing]
+ * - {Fetching}[rdoc-ref:Hash@Methods+for+Fetching]
+ * - {Assigning}[rdoc-ref:Hash@Methods+for+Assigning]
+ * - {Deleting}[rdoc-ref:Hash@Methods+for+Deleting]
+ * - {Iterating}[rdoc-ref:Hash@Methods+for+Iterating]
+ * - {Converting}[rdoc-ref:Hash@Methods+for+Converting]
+ * - {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.
*
@@ -7332,12 +7332,12 @@ Init_Hash(void)
*
* Here, class \ENV provides methods that are useful for:
*
- * - {Querying}[#class-ENV-label-Methods+for+Querying]
- * - {Assigning}[#class-ENV-label-Methods+for+Assigning]
- * - {Deleting}[#class-ENV-label-Methods+for+Deleting]
- * - {Iterating}[#class-ENV-label-Methods+for+Iterating]
- * - {Converting}[#class-ENV-label-Methods+for+Converting]
- * - {And more ....}[#class-ENV-label-More+Methods]
+ * - {Querying}[rdoc-ref:ENV@Methods+for+Querying]
+ * - {Assigning}[rdoc-ref:ENV@Methods+for+Assigning]
+ * - {Deleting}[rdoc-ref:ENV@Methods+for+Deleting]
+ * - {Iterating}[rdoc-ref:ENV@Methods+for+Iterating]
+ * - {Converting}[rdoc-ref:ENV@Methods+for+Converting]
+ * - {And more ....}[rdoc-ref:ENV@More+Methods]
*
* === Methods for Querying
*
diff --git a/io.c b/io.c
index 474c43c4c5..1eb912c023 100644
--- a/io.c
+++ b/io.c
@@ -2048,7 +2048,7 @@ io_writev(int argc, const VALUE *argv, VALUE io)
* write(*objects) -> integer
*
* Writes each of the given +objects+ to +self+,
- * which must be opened for writing (see {Modes}[#class-IO-label-Modes]);
+ * which must be opened for writing (see {Modes}[rdoc-ref:IO@Modes]);
* returns the total number bytes written;
* each of +objects+ that is not a string is converted via method +to_s+:
*
@@ -2108,7 +2108,7 @@ rb_io_writev(VALUE io, int argc, const VALUE *argv)
* self << object -> self
*
* Writes the given +object+ to +self+,
- * which must be opened for writing (see {Modes}[#class-IO-label-Modes]);
+ * which must be opened for writing (see {Modes}[rdoc-ref:IO@Modes]);
* returns +self+;
* if +object+ is not a string, it is converted via method +to_s+:
*
@@ -2190,7 +2190,7 @@ rb_io_flush(VALUE io)
* tell -> integer
*
* Returns the current position (in bytes) in +self+
- * (see {Position}[#class-IO-label-Position]):
+ * (see {Position}[rdoc-ref:IO@Position]):
*
* f = File.open('t.txt')
* f.tell # => 0
@@ -2255,7 +2255,7 @@ interpret_seek_whence(VALUE vwhence)
* seek(offset, whence = IO::SEEK_SET) -> 0
*
* Seeks to the position given by integer +offset+
- * (see {Position}[#class-IO-label-Position])
+ * (see {Position}[rdoc-ref:IO@Position])
* and constant +whence+, which is one of:
*
* - +:CUR+ or <tt>IO::SEEK_CUR</tt>:
@@ -2312,7 +2312,7 @@ rb_io_seek_m(int argc, VALUE *argv, VALUE io)
* pos = new_position -> new_position
*
* Seeks to the given +new_position+ (in bytes);
- * see {Position}[#class-IO-label-Position]:
+ * see {Position}[rdoc-ref:IO@Position]:
*
* f = File.open('t.txt')
* f.tell # => 0
@@ -2345,8 +2345,8 @@ static void clear_readconv(rb_io_t *fptr);
*
* Repositions the stream to its beginning,
* setting both the position and the line number to zero;
- * see {Position}[#class-IO-label-Position]
- * and {Line Number}[#class-IO-label-Line+Number]:
+ * see {Position}[rdoc-ref:IO@Position]
+ * and {Line Number}[rdoc-ref:IO@Line+Number]:
*
* f = File.open('t.txt')
* f.tell # => 0
@@ -2435,7 +2435,7 @@ io_fillbuf(rb_io_t *fptr)
* eof -> true or false
*
* Returns +true+ if the stream is positioned at its end, +false+ otherwise;
- * see {Position}[#class-IO-label-Position]:
+ * see {Position}[rdoc-ref:IO@Position]:
*
* f = File.open('t.txt')
* f.eof # => false
@@ -2443,7 +2443,7 @@ io_fillbuf(rb_io_t *fptr)
* f.eof # => true
*
* Raises an exception unless the stream is opened for reading;
- * see {Mode}[#class-IO-label-Mode].
+ * see {Mode}[rdoc-ref:IO@Mode].
*
* If +self+ is a stream such as pipe or socket, this method
* blocks until the other end sends some data or closes it:
@@ -3992,7 +3992,7 @@ rb_io_gets_internal(VALUE io)
* gets(sep, limit, **line_opts) -> string or nil
*
* Reads and returns a line from the stream
- * (see {Lines}[#class-IO-label-Lines]);
+ * (see {Lines}[rdoc-ref:IO@Lines]);
* assigns the return value to <tt>$_</tt>.
*
* With no arguments given, returns the next line
@@ -4009,7 +4009,7 @@ rb_io_gets_internal(VALUE io)
* With only string argument +sep+ given,
* returns the next line as determined by line separator +sep+,
* or +nil+ if none;
- * see {Line Separator}[#class-IO-label-Line+Separator]:
+ * see {Line Separator}[rdoc-ref:IO@Line+Separator]:
*
* f = File.new('t.txt')
* f.gets('l') # => "First l"
@@ -4028,7 +4028,7 @@ rb_io_gets_internal(VALUE io)
*
* With only integer argument +limit+ given,
* limits the number of bytes in the line;
- * see {Line Limit}}[#class-IO-label-Line+Limit]:
+ * see {Line Limit}}[rdoc-ref:IO@Line+Limit]:
*
* # No more than one line.
* File.open('t.txt') {|f| f.gets(10) } # => "First line"
@@ -4043,7 +4043,7 @@ rb_io_gets_internal(VALUE io)
* - But returns no more bytes than are allowed by the limit.
*
* For all forms above, trailing optional keyword arguments may be given;
- * see {Line Options}[#class-IO-label-Line+Options]:
+ * see {Line Options}[rdoc-ref:IO@Line+Options]:
*
* f = File.open('t.txt')
* # Chomp the lines.
@@ -4072,7 +4072,7 @@ rb_io_gets_m(int argc, VALUE *argv, VALUE io)
* lineno -> integer
*
* Returns the current line number for the stream.
- * See {Line Number}[#class-IO-label-Line+Number].
+ * See {Line Number}[rdoc-ref:IO@Line+Number].
*
*/
@@ -4091,7 +4091,7 @@ rb_io_lineno(VALUE io)
* lineno = integer -> integer
*
* Sets and returns the line number for the stream.
- * See {Line Number}[#class-IO-label-Line+Number].
+ * See {Line Number}[rdoc-ref:IO@Line+Number].
*
*/
@@ -4136,7 +4136,7 @@ static VALUE io_readlines(const struct getline_arg *arg, VALUE io);
* readlines(sep, limit, **line_opts) -> array
*
* Reads and returns all remaining line from the stream
- * (see {Lines}[#class-IO-label-Lines]);
+ * (see {Lines}[rdoc-ref:IO@Lines]);
* does not modify <tt>$_</tt>.
*
* With no arguments given, returns lines
@@ -4150,7 +4150,7 @@ static VALUE io_readlines(const struct getline_arg *arg, VALUE io);
* With only string argument +sep+ given,
* returns lines as determined by line separator +sep+,
* or +nil+ if none;
- * see {Line Separator}[#class-IO-label-Line+Separator]:
+ * see {Line Separator}[rdoc-ref:IO@Line+Separator]:
*
* f = File.new('t.txt')
* f.readlines('li')
@@ -4169,7 +4169,7 @@ static VALUE io_readlines(const struct getline_arg *arg, VALUE io);
*
* With only integer argument +limit+ given,
* limits the number of bytes in each line;
- * see {Line Limit}}[#class-IO-label-Line+Limit]:
+ * see {Line Limit}}[rdoc-ref:IO@Line+Limit]:
*
* f = File.new('t.txt')
* f.readlines(8)
@@ -4182,7 +4182,7 @@ static VALUE io_readlines(const struct getline_arg *arg, VALUE io);
* - But returns no more bytes in a line than are allowed by the limit.
*
* For all forms above, trailing optional keyword arguments may be given;
- * see {Line Options}[#class-IO-label-Line+Options]:
+ * see {Line Options}[rdoc-ref:IO@Line+Options]:
*
* f = File.new('t.txt')
* f.readlines(chomp: true)
@@ -4221,7 +4221,7 @@ io_readlines(const struct getline_arg *arg, VALUE io)
* each_line -> enumerator
*
* Calls the block with each remaining line read from the stream
- * (see {Lines}[#class-IO-label-Lines]);
+ * (see {Lines}[rdoc-ref:IO@Lines]);
* does nothing if already at end-of-file;
* returns +self+.
*
@@ -4242,7 +4242,7 @@ io_readlines(const struct getline_arg *arg, VALUE io)
*
* With only string argument +sep+ given,
* reads lines as determined by line separator +sep+;
- * see {Line Separator}[#class-IO-label-Line+Separator]:
+ * see {Line Separator}[rdoc-ref:IO@Line+Separator]:
*
* f = File.new('t.txt')
* f.each_line('li') {|line| p line }
@@ -4276,7 +4276,7 @@ io_readlines(const struct getline_arg *arg, VALUE io)
*
* With only integer argument +limit+ given,
* limits the number of bytes in each line;
- * see {Line Limit}}[#class-IO-label-Line+Limit]:
+ * see {Line Limit}}[rdoc-ref:IO@Line+Limit]:
*
* f = File.new('t.txt')
* f.each_line(8) {|line| p line }
@@ -4300,7 +4300,7 @@ io_readlines(const struct getline_arg *arg, VALUE io)
* - But returns no more bytes than are allowed by the limit.
*
* For all forms above, trailing optional keyword arguments may be given;
- * see {Line Options}[#class-IO-label-Line+Options]:
+ * see {Line Options}[rdoc-ref:IO@Line+Options]:
*
* f = File.new('t.txt')
* f.each_line(chomp: true) {|line| p line }
@@ -5747,7 +5747,7 @@ pread_internal_call(VALUE arg)
*
* - Reads at the given +offset+ (in bytes).
* - Disregards, and does not modify, the stream's position
- * (see {Position}[#class-IO-label-Position]).
+ * (see {Position}[rdoc-ref:IO@Position]).
* - Bypasses any user space buffering in the stream.
*
* Because this method does not disturb the stream's state
@@ -5822,7 +5822,7 @@ internal_pwrite_func(void *ptr)
*
* - Writes at the given +offset+ (in bytes).
* - Disregards, and does not modify, the stream's position
- * (see {Position}[#class-IO-label-Position]).
+ * (see {Position}[rdoc-ref:IO@Position]).
* - Bypasses any user space buffering in the stream.
*
* Because this method does not disturb the stream's state
@@ -5932,7 +5932,7 @@ rb_io_ascii8bit_binmode(VALUE io)
* binmode -> self
*
* Sets the stream's data mode as binary
- * (see {Data Mode}[#class-IO-label-Data+Mode]).
+ * (see {Data Mode}[rdoc-ref:IO@Data+Mode]).
*
* A stream's data mode may not be changed from binary to text.
*
@@ -5956,7 +5956,7 @@ rb_io_binmode_m(VALUE io)
* binmode? -> true or false
*
* Returns +true+ if the stream is on binary mode, +false+ otherwise.
- * See {Data Mode}[#class-IO-label-Data+Mode].
+ * See {Data Mode}[rdoc-ref:IO@Data+Mode].
*
*/
static VALUE
@@ -7384,7 +7384,7 @@ static VALUE popen_finish(VALUE port, VALUE klass);
* and the block's value is assigned to global variable <tt>$?</tt> and returned.
*
* Optional argument +mode+ may be any valid \IO mode.
- * See {Modes}[#class-IO-label-Modes].
+ * See {Modes}[rdoc-ref:IO@Modes].
*
* Required argument +cmd+ determines which of the following occurs:
*
@@ -7404,7 +7404,7 @@ static VALUE popen_finish(VALUE port, VALUE klass);
* pipe.gets
* end => "bar\n"
*
- * The optional keyword arguments +opts+ may be {\IO open options}[#class-IO-label-Open+Options]
+ * The optional keyword arguments +opts+ may be {\IO open options}[rdoc-ref:IO@Open+Options]
* and options for Kernel#spawn.
*
* <b>Forked \Process</b>
@@ -8022,7 +8022,7 @@ rb_freopen(VALUE fname, const char *mode, FILE *fp)
* $stdout.reopen('t.tmp', 'w')
*
* The optional keyword arguments +open_opts+ may be open options;
- * see {\IO Open Options}[#class-IO-label-Open+Options]
+ * see {\IO Open Options}[rdoc-ref:IO@Open+Options]
*
*/
@@ -8936,13 +8936,13 @@ rb_io_make_open_file(VALUE obj)
* IO.new(fd) # => #<IO:fd 3>
*
* Optional argument +mode+ (defaults to 'r') must specify a valid mode
- * see {\IO Modes}[#class-IO-label-Modes]:
+ * see {\IO Modes}[rdoc-ref:IO@Modes]:
*
* IO.new(fd, 'w') # => #<IO:fd 3>
* IO.new(fd, File::WRONLY) # => #<IO:fd 3>
*
* Optional argument +open_opts+ must specify valid open options
- * see {IO Open Options}[#class-IO-label-Open+Options]:
+ * see {IO Open Options}[rdoc-ref:IO@Open+Options]:
*
* IO.new(fd, internal_encoding: nil) # => #<IO:fd 3>
* IO.new(fd, autoclose: true) # => #<IO:fd 3>
@@ -11015,7 +11015,7 @@ pipe_pair_close(VALUE rw)
* optional hash arguments specify the conversion option.
*
* Optional argument +opts+ must specify valid open options
- * (see {IO Open Options}[#class-IO-label-Open+Options])
+ * (see {IO Open Options}[rdoc-ref:IO@Open+Options])
* and/or valid encoding options (see String#encode).
*
* With no block given, returns the two endpoints in an array:
@@ -11238,7 +11238,7 @@ io_s_foreach(VALUE v)
* For both forms, command and path, the remaining arguments are the same.
*
* With argument +sep+ given, parses lines as determined by that line separator
- * (see {IO Line Separator}[#class-IO-label-Line+Separator]):
+ * (see {IO Line Separator}[rdoc-ref:IO@Line+Separator]):
*
* File.foreach('t.txt', 'li') {|line| p line }
*
@@ -11261,7 +11261,7 @@ io_s_foreach(VALUE v)
*
* With argument +limit+ given, parses lines as determined by the default
* line separator and the given line-length limit
- * (see {IO Line Limit}[#class-IO-label-Line+Limit]):
+ * (see {IO Line Limit}[rdoc-ref:IO@Line+Limit]):
*
* File.foreach('t.txt', 7) {|line| p line }
*
@@ -11280,12 +11280,12 @@ io_s_foreach(VALUE v)
* With arguments +sep+ and +limit+ given,
* parses lines as determined by the given
* line separator and the given line-length limit
- * (see {IO Line Separator and Line Limit}[#class-IO-label-Line+Separator+and+Line+Limit]):
+ * (see {IO Line Separator and Line Limit}[rdoc-ref:IO@Line+Separator+and+Line+Limit]):
*
* Optional argument +opts+ specifies open options
- * (see {IO Open Options}[#class-IO-label-Open+Options])
+ * (see {IO Open Options}[rdoc-ref:IO@Open+Options])
* and/or valid line options
- * (see {IO Line Options}[#class-IO-label-Line+Options])
+ * (see {IO Line Options}[rdoc-ref:IO@Line+Options])
*
* Returns an Enumerator if no block is given.
*
@@ -11351,7 +11351,7 @@ io_s_readlines(VALUE v)
* For both forms, command and path, the remaining arguments are the same.
*
* With argument +sep+ given, parses lines as determined by that line separator
- * (see {IO Line Separator}[#class-IO-label-Line+Separator]):
+ * (see {IO Line Separator}[rdoc-ref:IO@Line+Separator]):
*
* # Ordinary separator.
* IO.readlines('t.txt', 'li')
@@ -11365,7 +11365,7 @@ io_s_readlines(VALUE v)
*
* With argument +limit+ given, parses lines as determined by the default
* line separator and the given line-length limit
- * (see {IO Line Limit}[#class-IO-label-Line+Limit]):
+ * (see {IO Line Limit}[rdoc-ref:IO@Line+Limit]):
*
* IO.readlines('t.txt', 7)
* # => ["First l", "ine\n", "Second ", "line\n", "\n", "Third l", "ine\n", "Fourth ", "line\n"]
@@ -11373,12 +11373,12 @@ io_s_readlines(VALUE v)
* With arguments +sep+ and +limit+ given,
* parses lines as determined by the given
* line separator and the given line-length limit
- * (see {IO Line Separator and Line Limit}[#class-IO-label-Line+Separator+and+Line+Limit]):
+ * (see {IO Line Separator and Line Limit}[rdoc-ref:IO@Line+Separator+and+Line+Limit]):
*
* Optional argument +opts+ specifies open options
- * (see {IO Open Options}[#class-IO-label-Open+Options])
+ * (see {IO Open Options}[rdoc-ref:IO@Open+Options])
* and/or valid line options
- * (see {IO Line Options}[#class-IO-label-Line+Options])
+ * (see {IO Line Options}[rdoc-ref:IO@Line+Options])
*
*/
@@ -11461,7 +11461,7 @@ seek_before_access(VALUE argp)
* IO.read('t.txt', 10, 200) # => nil
*
* The optional keyword arguments +open_opts+ may be open options;
- * see {\IO Open Options}[#class-IO-label-Open+Options]
+ * see {\IO Open Options}[rdoc-ref:IO@Open+Options]
*
*/
@@ -11642,7 +11642,7 @@ io_s_write(int argc, VALUE *argv, VALUE klass, int binary)
* File.read('t.tmp') # => "ab012f\u0000\u0000\u0000\u0000xyz"
*
* The optional keyword arguments +open_opts+ may be open options;
- * see {\IO Open Options}[#class-IO-label-Open+Options]
+ * see {\IO Open Options}[rdoc-ref:IO@Open+Options]
*
*/
@@ -12659,7 +12659,7 @@ rb_io_s_copy_stream(int argc, VALUE *argv, VALUE io)
* Returns the Encoding object that represents the encoding of the stream,
* or +nil+ if the stream is in write mode and no encoding is specified.
*
- * See {Encodings}[#class-IO-label-Encodings].
+ * See {Encodings}[rdoc-ref:IO@Encodings].
*
*/
@@ -12687,7 +12687,7 @@ rb_io_external_encoding(VALUE io)
* if conversion is specified,
* or +nil+ otherwise.
*
- * See {Encodings}[#class-IO-label-Encodings].
+ * See {Encodings}[rdoc-ref:IO@Encodings].
*
*/
@@ -12706,7 +12706,7 @@ rb_io_internal_encoding(VALUE io)
* set_encoding(ext_enc, int_enc, **enc_opts) -> self
* set_encoding('ext_enc:int_enc', **enc_opts) -> self
*
- * See {Encodings}[#class-IO-label-Encodings].
+ * See {Encodings}[rdoc-ref:IO@Encodings].
*
* Argument +ext_enc+, if given, must be an Encoding object;
* it is assigned as the encoding for the stream.
@@ -14038,17 +14038,17 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
* An \IO stream has:
*
* - A read/write mode, which may be read-only, write-only, or read/write;
- * see {Read/Write Mode}[#class-IO-label-Read-2FWrite+Mode].
+ * see {Read/Write Mode}[rdoc-ref:IO@Read-2FWrite+Mode].
* - A data mode, which may be text-only or binary;
- * see {Data Mode}[#class-IO-label-Data+Mode].
+ * see {Data Mode}[rdoc-ref:IO@Data+Mode].
* - A position, which determines where in the stream the next
* read or write is to occur;
- * see {Position}[#class-IO-label-Position].
+ * see {Position}[rdoc-ref:IO@Position].
* - A line number, which is a special, line-oriented, "position"
* (different from the position mentioned above);
- * see {Line Number}[#class-IO-label-Line+Number].
+ * see {Line Number}[rdoc-ref:IO@Line+Number].
* - Internal and external encodings;
- * see {Encodings}[#class-IO-label-Encodings].
+ * see {Encodings}[rdoc-ref:IO@Encodings].
*
* == Extension <tt>io/console</tt>
*
@@ -14382,16 +14382,16 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
*
* Here, class \IO provides methods that are useful for:
*
- * - {Creating}[#class-IO-label-Creating]
- * - {Reading}[#class-IO-label-Reading]
- * - {Writing}[#class-IO-label-Writing]
- * - {Positioning}[#class-IO-label-Positioning]
- * - {Iterating}[#class-IO-label-Iterating]
- * - {Settings}[#class-IO-label-Settings]
- * - {Querying}[#class-IO-label-Querying]
- * - {Buffering}[#class-IO-label-Buffering]
- * - {Low-Level Access}[#class-IO-label-Low-Level+Access]
- * - {Other}[#class-IO-label-Other]
+ * - {Creating}[rdoc-ref:IO@Creating]
+ * - {Reading}[rdoc-ref:IO@Reading]
+ * - {Writing}[rdoc-ref:IO@Writing]
+ * - {Positioning}[rdoc-ref:IO@Positioning]
+ * - {Iterating}[rdoc-ref:IO@Iterating]
+ * - {Settings}[rdoc-ref:IO@Settings]
+ * - {Querying}[rdoc-ref:IO@Querying]
+ * - {Buffering}[rdoc-ref:IO@Buffering]
+ * - {Low-Level Access}[rdoc-ref:IO@Low-Level+Access]
+ * - {Other}[rdoc-ref:IO@Other]
*
* === Creating
*
diff --git a/numeric.c b/numeric.c
index 7f70b02dad..bd1121b567 100644
--- a/numeric.c
+++ b/numeric.c
@@ -962,9 +962,9 @@ num_negative_p(VALUE num)
*
* Here, class \Float provides methods for:
*
- * - {Querying}[#class-Float-label-Querying]
- * - {Comparing}[#class-Float-label-Comparing]
- * - {Converting}[#class-Float-label-Converting]
+ * - {Querying}[rdoc-ref:Float@Querying]
+ * - {Comparing}[rdoc-ref:Float@Comparing]
+ * - {Converting}[rdoc-ref:Float@Converting]
*
* === Querying
*
@@ -3499,10 +3499,10 @@ rb_num2ull(VALUE val)
*
* Here, class \Integer provides methods for:
*
- * - {Querying}[#class-Integer-label-Querying]
- * - {Comparing}[#class-Integer-label-Comparing]
- * - {Converting}[#class-Integer-label-Converting]
- * - {Other}[#class-Integer-label-Other]
+ * - {Querying}[rdoc-ref:Integer@Querying]
+ * - {Comparing}[rdoc-ref:Integer@Comparing]
+ * - {Converting}[rdoc-ref:Integer@Converting]
+ * - {Other}[rdoc-ref:Integer@Other]
*
* === Querying
*
@@ -6104,10 +6104,10 @@ int_s_try_convert(VALUE self, VALUE num)
*
* Here, class \Numeric provides methods for:
*
- * - {Querying}[#class-Numeric-label-Querying]
- * - {Comparing}[#class-Numeric-label-Comparing]
- * - {Converting}[#class-Numeric-label-Converting]
- * - {Other}[#class-Numeric-label-Other]
+ * - {Querying}[rdoc-ref:Numeric@Querying]
+ * - {Comparing}[rdoc-ref:Numeric@Comparing]
+ * - {Converting}[rdoc-ref:Numeric@Converting]
+ * - {Other}[rdoc-ref:Numeric@Other]
*
* === Querying
*
diff --git a/object.c b/object.c
index 4eff17f160..586c5f9ccd 100644
--- a/object.c
+++ b/object.c
@@ -4167,9 +4167,9 @@ f_sprintf(int c, const VALUE *v, VALUE _)
*
* Here, class \Object provides methods for:
*
- * - {Querying}[#class-Object-label-Querying]
- * - {Instance Variables}[#class-Object-label-Instance+Variables]
- * - {Other}[#class-Object-label-Other]
+ * - {Querying}[rdoc-ref:Object@Querying]
+ * - {Instance Variables}[rdoc-ref:Object@Instance+Variables]
+ * - {Other}[rdoc-ref:Object@Other]
*
* === Querying
*
@@ -4304,18 +4304,18 @@ InitVM_Object(void)
*
* \Module \Kernel provides methods that are useful for:
*
- * - {Converting}[#module-Kernel-label-Converting]
- * - {Querying}[#module-Kernel-label-Querying]
- * - {Exiting}[#module-Kernel-label-Exiting]
- * - {Exceptions}[#module-Kernel-label-Exceptions]
- * - {IO}[#module-Kernel-label-IO]
- * - {Procs}[#module-Kernel-label-Procs]
- * - {Tracing}[#module-Kernel-label-Tracing]
- * - {Subprocesses}[#module-Kernel-label-Subprocesses]
- * - {Loading}[#module-Kernel-label-Loading]
- * - {Yielding}[#module-Kernel-label-Yielding]
- * - {Random Values}[#module-Kernel-label-Random+Values]
- * - {Other}[#module-Kernel-label-Other]
+ * - {Converting}[rdoc-ref:Kernel@Converting]
+ * - {Querying}[rdoc-ref:Kernel@Querying]
+ * - {Exiting}[rdoc-ref:Kernel@Exiting]
+ * - {Exceptions}[rdoc-ref:Kernel@Exceptions]
+ * - {IO}[rdoc-ref:Kernel@IO]
+ * - {Procs}[rdoc-ref:Kernel@Procs]
+ * - {Tracing}[rdoc-ref:Kernel@Tracing]
+ * - {Subprocesses}[rdoc-ref:Kernel@Subprocesses]
+ * - {Loading}[rdoc-ref:Kernel@Loading]
+ * - {Yielding}[rdoc-ref:Kernel@Yielding]
+ * - {Random Values}[rdoc-ref:Kernel@Random+Values]
+ * - {Other}[rdoc-ref:Kernel@Other]
*
* === Converting
*
diff --git a/range.c b/range.c
index 8d8fe11991..0acbc36045 100644
--- a/range.c
+++ b/range.c
@@ -2213,11 +2213,11 @@ range_count(int argc, VALUE *argv, VALUE range)
*
* Here, class \Range provides methods that are useful for:
*
- * - {Creating a Range}[#class-Range-label-Methods+for+Creating+a+Range]
- * - {Querying}[#class-Range-label-Methods+for+Querying]
- * - {Comparing}[#class-Range-label-Methods+for+Comparing]
- * - {Iterating}[#class-Range-label-Methods+for+Iterating]
- * - {Converting}[#class-Range-label-Methods+for+Converting]
+ * - {Creating a Range}[rdoc-ref:Range@Methods+for+Creating+a+Range]
+ * - {Querying}[rdoc-ref:Range@Methods+for+Querying]
+ * - {Comparing}[rdoc-ref:Range@Methods+for+Comparing]
+ * - {Iterating}[rdoc-ref:Range@Methods+for+Iterating]
+ * - {Converting}[rdoc-ref:Range@Methods+for+Converting]
*
* === Methods for Creating a \Range
*
diff --git a/string.c b/string.c
index 1c45688ce8..af3c0b7aac 100644
--- a/string.c
+++ b/string.c
@@ -5502,7 +5502,7 @@ rb_pat_search(VALUE pat, VALUE str, long pos, int set_backref_str)
* Returns +self+ with only the first occurrence
* (not all occurrences) of the given +pattern+ replaced.
*
- * See {Substitution Methods}[#class-String-label-Substitution+Methods].
+ * See {Substitution Methods}[rdoc-ref:String@Substitution+Methods].
*
* Related: String#sub, String#gsub, String#gsub!.
*
@@ -5625,7 +5625,7 @@ rb_str_sub_bang(int argc, VALUE *argv, VALUE str)
* Returns a copy of +self+ with only the first occurrence
* (not all occurrences) of the given +pattern+ replaced.
*
- * See {Substitution Methods}[#class-String-label-Substitution+Methods].
+ * See {Substitution Methods}[rdoc-ref:String@Substitution+Methods].
*
* Related: String#sub!, String#gsub, String#gsub!.
*
@@ -5771,7 +5771,7 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
* Performs the specified substring replacement(s) on +self+;
* returns +self+ if any replacement occurred, +nil+ otherwise.
*
- * See {Substitution Methods}[#class-String-label-Substitution+Methods].
+ * See {Substitution Methods}[rdoc-ref:String@Substitution+Methods].
*
* Returns an Enumerator if no +replacement+ and no block given.
*
@@ -5795,7 +5795,7 @@ rb_str_gsub_bang(int argc, VALUE *argv, VALUE str)
*
* Returns a copy of +self+ with all occurrences of the given +pattern+ replaced.
*
- * See {Substitution Methods}[#class-String-label-Substitution+Methods].
+ * See {Substitution Methods}[rdoc-ref:String@Substitution+Methods].
*
* Returns an Enumerator if no +replacement+ and no block given.
*
@@ -11296,9 +11296,9 @@ rb_str_unicode_normalized_p(int argc, VALUE *argv, VALUE str)
*
* Here, class \Symbol provides methods that are useful for:
*
- * - {Querying}[#class-Symbol-label-Methods+for+Querying]
- * - {Comparing}[#class-Symbol-label-Methods+for+Comparing]
- * - {Converting}[#class-Symbol-label-Methods+for+Converting]
+ * - {Querying}[rdoc-ref:Symbol@Methods+for+Querying]
+ * - {Comparing}[rdoc-ref:Symbol@Methods+for+Comparing]
+ * - {Converting}[rdoc-ref:Symbol@Methods+for+Converting]
*
* === Methods for Querying
*
@@ -12100,14 +12100,14 @@ rb_enc_interned_str_cstr(const char *ptr, rb_encoding *enc)
*
* Here, class \String provides methods that are useful for:
*
- * - {Creating a String}[#class-String-label-Methods+for+Creating+a+String]
- * - {Frozen/Unfrozen Strings}[#class-String-label-Methods+for+a+Frozen-2FUnfrozen+String]
- * - {Querying}[#class-String-label-Methods+for+Querying]
- * - {Comparing}[#class-String-label-Methods+for+Comparing]
- * - {Modifying a String}[#class-String-label-Methods+for+Modifying+a+String]
- * - {Converting to New String}[#class-String-label-Methods+for+Converting+to+New+String]
- * - {Converting to Non-String}[#class-String-label-Methods+for+Converting+to+Non--5CString]
- * - {Iterating}[#class-String-label-Methods+for+Iterating]
+ * - {Creating a String}[rdoc-ref:String@Methods+for+Creating+a+String]
+ * - {Frozen/Unfrozen Strings}[rdoc-ref:String@Methods+for+a+Frozen-2FUnfrozen+String]
+ * - {Querying}[rdoc-ref:String@Methods+for+Querying]
+ * - {Comparing}[rdoc-ref:String@Methods+for+Comparing]
+ * - {Modifying a String}[rdoc-ref:String@Methods+for+Modifying+a+String]
+ * - {Converting to New String}[rdoc-ref:String@Methods+for+Converting+to+New+String]
+ * - {Converting to Non-String}[rdoc-ref:String@Methods+for+Converting+to+Non--5CString]
+ * - {Iterating}[rdoc-ref:String@Methods+for+Iterating]
*
* === Methods for Creating a \String
*
diff --git a/struct.c b/struct.c
index 453ebfc989..0fd54591e8 100644
--- a/struct.c
+++ b/struct.c
@@ -1568,13 +1568,13 @@ rb_struct_dig(int argc, VALUE *argv, VALUE self)
*
* Here, class \Struct provides methods that are useful for:
*
- * - {Creating a Struct Subclass}[#class-Struct-label-Methods+for+Creating+a+Struct+Subclass]
- * - {Querying}[#class-Struct-label-Methods+for+Querying]
- * - {Comparing}[#class-Struct-label-Methods+for+Comparing]
- * - {Fetching}[#class-Struct-label-Methods+for+Fetching]
- * - {Assigning}[#class-Struct-label-Methods+for+Assigning]
- * - {Iterating}[#class-Struct-label-Methods+for+Iterating]
- * - {Converting}[#class-Struct-label-Methods+for+Converting]
+ * - {Creating a Struct Subclass}[rdoc-ref:Struct@Methods+for+Creating+a+Struct+Subclass]
+ * - {Querying}[rdoc-ref:Struct@Methods+for+Querying]
+ * - {Comparing}[rdoc-ref:Struct@Methods+for+Comparing]
+ * - {Fetching}[rdoc-ref:Struct@Methods+for+Fetching]
+ * - {Assigning}[rdoc-ref:Struct@Methods+for+Assigning]
+ * - {Iterating}[rdoc-ref:Struct@Methods+for+Iterating]
+ * - {Converting}[rdoc-ref:Struct@Methods+for+Converting]
*
* === Methods for Creating a Struct Subclass
*