Skip to content

Commit 1a002d9

Browse files
Fix formatting errors in What's Here for Array, Hash, ENV (#5718)
1 parent d0b7df8 commit 1a002d9

File tree

2 files changed

+117
-117
lines changed

2 files changed

+117
-117
lines changed

array.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8194,7 +8194,7 @@ rb_ary_deconstruct(VALUE ary)
81948194
*
81958195
* === Methods for Comparing
81968196
8197-
* - {<=>}[Array.html#method-i-3C-3D-3E]: Returns -1, 0, or 1
8197+
* - {<=>}[#method-i-3C-3D-3E]: Returns -1, 0, or 1
81988198
* as +self+ is less than, equal to, or greater than a given object.
81998199
* - #==: Returns whether each element in +self+ is <tt>==</tt> to the corresponding element
82008200
* in a given object.
@@ -8277,12 +8277,12 @@ rb_ary_deconstruct(VALUE ary)
82778277
*
82788278
* === Methods for Combining
82798279
*
8280-
* - {&}[Array.html#method-i-26]: Returns an array containing elements found both in +self+ and a given array.
8280+
* - {&}[#method-i-26]: Returns an array containing elements found both in +self+ and a given array.
82818281
* - #intersection: Returns an array containing elements found both in +self+
82828282
* and in each given array.
82838283
* - #+: Returns an array containing all elements of +self+ followed by all elements of a given array.
8284-
* - #-: Returns an array containiing all elements of +self+ that are not found in a given array.
8285-
* - {|}[Array.html#method-i-7C]: Returns an array containing all elements of +self+ and all elements of a given array,
8284+
* - #-: Returns an array containing all elements of +self+ that are not found in a given array.
8285+
* - {|}[#method-i-7C]: Returns an array containing all elements of +self+ and all elements of a given array,
82868286
* duplicates removed.
82878287
* - #union: Returns an array containing all elements of +self+ and all elements of given arrays,
82888288
* duplicates removed.

hash.c

Lines changed: 113 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -7036,107 +7036,107 @@ static const rb_data_type_t env_data_type = {
70367036
*
70377037
* ==== Methods for Creating a \Hash
70387038
*
7039-
* ::[]:: Returns a new hash populated with given objects.
7040-
* ::new:: Returns a new empty hash.
7041-
* ::try_convert:: Returns a new hash created from a given object.
7039+
* - ::[]: Returns a new hash populated with given objects.
7040+
* - ::new: Returns a new empty hash.
7041+
* - ::try_convert: Returns a new hash created from a given object.
70427042
*
70437043
* ==== Methods for Setting \Hash State
70447044
*
7045-
* #compare_by_identity:: Sets +self+ to consider only identity in comparing keys.
7046-
* #default=:: Sets the default to a given value.
7047-
* #default_proc=:: Sets the default proc to a given proc.
7048-
* #rehash:: Rebuilds the hash table by recomputing the hash index for each key.
7045+
* - #compare_by_identity: Sets +self+ to consider only identity in comparing keys.
7046+
* - #default=: Sets the default to a given value.
7047+
* - #default_proc=: Sets the default proc to a given proc.
7048+
* - #rehash: Rebuilds the hash table by recomputing the hash index for each key.
70497049
*
70507050
* ==== Methods for Querying
70517051
*
7052-
* #any?:: Returns whether any element satisfies a given criterion.
7053-
* #compare_by_identity?:: Returns whether the hash considers only identity when comparing keys.
7054-
* #default:: Returns the default value, or the default value for a given key.
7055-
* #default_proc:: Returns the default proc.
7056-
* #empty?:: Returns whether there are no entries.
7057-
* #eql?:: Returns whether a given object is equal to +self+.
7058-
* #hash:: Returns the integer hash code.
7059-
* #has_value?:: Returns whether a given object is a value in +self+.
7060-
* #include?, #has_key?, #member?, #key?:: Returns whether a given object is a key in +self+.
7061-
* #length, #size:: Returns the count of entries.
7062-
* #value?:: Returns whether a given object is a value in +self+.
7052+
* - #any?: Returns whether any element satisfies a given criterion.
7053+
* - #compare_by_identity?: Returns whether the hash considers only identity when comparing keys.
7054+
* - #default: Returns the default value, or the default value for a given key.
7055+
* - #default_proc: Returns the default proc.
7056+
* - #empty?: Returns whether there are no entries.
7057+
* - #eql?: Returns whether a given object is equal to +self+.
7058+
* - #hash: Returns the integer hash code.
7059+
* - #has_value?: Returns whether a given object is a value in +self+.
7060+
* - #include?, #has_key?, #member?, #key?: Returns whether a given object is a key in +self+.
7061+
* - #length, #size: Returns the count of entries.
7062+
* - #value?: Returns whether a given object is a value in +self+.
70637063
*
70647064
* ==== Methods for Comparing
70657065
*
7066-
* #<:: Returns whether +self+ is a proper subset of a given object.
7067-
* #<=:: Returns whether +self+ is a subset of a given object.
7068-
* #==:: Returns whether a given object is equal to +self+.
7069-
* #>:: Returns whether +self+ is a proper superset of a given object
7070-
* #>=:: Returns whether +self+ is a proper superset of a given object.
7066+
* - {<}[#method-i-3C]: Returns whether +self+ is a proper subset of a given object.
7067+
* - {<=}[#method-i-3C-3D]: Returns whether +self+ is a subset of a given object.
7068+
* - #==: Returns whether a given object is equal to +self+.
7069+
* - {>}[#method-i-3E]: Returns whether +self+ is a proper superset of a given object
7070+
* - {>=}[#method-i-3E-3D]: Returns whether +self+ is a proper superset of a given object.
70717071
*
70727072
* ==== Methods for Fetching
70737073
*
7074-
* #[]:: Returns the value associated with a given key.
7075-
* #assoc:: Returns a 2-element array containing a given key and its value.
7076-
* #dig:: Returns the object in nested objects that is specified
7077-
* by a given key and additional arguments.
7078-
* #fetch:: Returns the value for a given key.
7079-
* #fetch_values:: Returns array containing the values associated with given keys.
7080-
* #key:: Returns the key for the first-found entry with a given value.
7081-
* #keys:: Returns an array containing all keys in +self+.
7082-
* #rassoc:: Returns a 2-element array consisting of the key and value
7083-
of the first-found entry having a given value.
7084-
* #values:: Returns an array containing all values in +self+/
7085-
* #values_at:: Returns an array containing values for given keys.
7074+
* - #[]: Returns the value associated with a given key.
7075+
* - #assoc: Returns a 2-element array containing a given key and its value.
7076+
* - #dig: Returns the object in nested objects that is specified
7077+
* by a given key and additional arguments.
7078+
* - #fetch: Returns the value for a given key.
7079+
* - #fetch_values: Returns array containing the values associated with given keys.
7080+
* - #key: Returns the key for the first-found entry with a given value.
7081+
* - #keys: Returns an array containing all keys in +self+.
7082+
* - #rassoc: Returns a 2-element array consisting of the key and value
7083+
of the first-found entry having a given value.
7084+
* - #values: Returns an array containing all values in +self+/
7085+
* - #values_at: Returns an array containing values for given keys.
70867086
*
70877087
* ==== Methods for Assigning
70887088
*
7089-
* #[]=, #store:: Associates a given key with a given value.
7090-
* #merge:: Returns the hash formed by merging each given hash into a copy of +self+.
7091-
* #merge!, #update:: Merges each given hash into +self+.
7092-
* #replace:: Replaces the entire contents of +self+ with the contents of a given hash.
7089+
* - #[]=, #store: Associates a given key with a given value.
7090+
* - #merge: Returns the hash formed by merging each given hash into a copy of +self+.
7091+
* - #merge!, #update: Merges each given hash into +self+.
7092+
* - #replace: Replaces the entire contents of +self+ with the contents of a given hash.
70937093
*
70947094
* ==== Methods for Deleting
70957095
*
70967096
* These methods remove entries from +self+:
70977097
*
7098-
* #clear:: Removes all entries from +self+.
7099-
* #compact!:: Removes all +nil+-valued entries from +self+.
7100-
* #delete:: Removes the entry for a given key.
7101-
* #delete_if:: Removes entries selected by a given block.
7102-
* #filter!, #select!:: Keep only those entries selected by a given block.
7103-
* #keep_if:: Keep only those entries selected by a given block.
7104-
* #reject!:: Removes entries selected by a given block.
7105-
* #shift:: Removes and returns the first entry.
7098+
* - #clear: Removes all entries from +self+.
7099+
* - #compact!: Removes all +nil+-valued entries from +self+.
7100+
* - #delete: Removes the entry for a given key.
7101+
* - #delete_if: Removes entries selected by a given block.
7102+
* - #filter!, #select!: Keep only those entries selected by a given block.
7103+
* - #keep_if: Keep only those entries selected by a given block.
7104+
* - #reject!: Removes entries selected by a given block.
7105+
* - #shift: Removes and returns the first entry.
71067106
*
71077107
* These methods return a copy of +self+ with some entries removed:
71087108
*
7109-
* #compact:: Returns a copy of +self+ with all +nil+-valued entries removed.
7110-
* #except:: Returns a copy of +self+ with entries removed for specified keys.
7111-
* #filter, #select:: Returns a copy of +self+ with only those entries selected by a given block.
7112-
* #reject:: Returns a copy of +self+ with entries removed as specified by a given block.
7113-
* #slice:: Returns a hash containing the entries for given keys.
7109+
* - #compact: Returns a copy of +self+ with all +nil+-valued entries removed.
7110+
* - #except: Returns a copy of +self+ with entries removed for specified keys.
7111+
* - #filter, #select: Returns a copy of +self+ with only those entries selected by a given block.
7112+
* - #reject: Returns a copy of +self+ with entries removed as specified by a given block.
7113+
* - #slice: Returns a hash containing the entries for given keys.
71147114
*
71157115
* ==== Methods for Iterating
7116-
* #each, #each_pair:: Calls a given block with each key-value pair.
7117-
* #each_key:: Calls a given block with each key.
7118-
* #each_value:: Calls a given block with each value.
7116+
* - #each, #each_pair: Calls a given block with each key-value pair.
7117+
* - #each_key: Calls a given block with each key.
7118+
* - #each_value: Calls a given block with each value.
71197119
*
71207120
* ==== Methods for Converting
71217121
*
7122-
* #inspect, #to_s:: Returns a new String containing the hash entries.
7123-
* #to_a:: Returns a new array of 2-element arrays;
7124-
* each nested array contains a key-value pair from +self+.
7125-
* #to_h:: Returns +self+ if a \Hash;
7126-
* if a subclass of \Hash, returns a \Hash containing the entries from +self+.
7127-
* #to_hash:: Returns +self+.
7128-
* #to_proc:: Returns a proc that maps a given key to its value.
7122+
* - #inspect, #to_s: Returns a new String containing the hash entries.
7123+
* - #to_a: Returns a new array of 2-element arrays;
7124+
* each nested array contains a key-value pair from +self+.
7125+
* - #to_h: Returns +self+ if a \Hash;
7126+
* if a subclass of \Hash, returns a \Hash containing the entries from +self+.
7127+
* - #to_hash: Returns +self+.
7128+
* - #to_proc: Returns a proc that maps a given key to its value.
71297129
*
71307130
* ==== Methods for Transforming Keys and Values
71317131
*
7132-
* #transform_keys:: Returns a copy of +self+ with modified keys.
7133-
* #transform_keys!:: Modifies keys in +self+
7134-
* #transform_values:: Returns a copy of +self+ with modified values.
7135-
* #transform_values!:: Modifies values in +self+.
7132+
* - #transform_keys: Returns a copy of +self+ with modified keys.
7133+
* - #transform_keys!: Modifies keys in +self+
7134+
* - #transform_values: Returns a copy of +self+ with modified values.
7135+
* - #transform_values!: Modifies values in +self+.
71367136
*
71377137
* ==== Other Methods
7138-
* #flatten:: Returns an array that is a 1-dimensional flattening of +self+.
7139-
* #invert:: Returns a hash with the each key-value pair inverted.
7138+
* - #flatten: Returns an array that is a 1-dimensional flattening of +self+.
7139+
* - #invert: Returns a hash with the each key-value pair inverted.
71407140
*
71417141
*/
71427142

@@ -7341,66 +7341,66 @@ Init_Hash(void)
73417341
*
73427342
* === Methods for Querying
73437343
*
7344-
* - ::[]:: Returns the value for the given environment variable name if it exists:
7345-
* - ::empty?:: Returns whether \ENV is empty.
7346-
* - ::has_value?, ::value?:: Returns whether the given value is in \ENV.
7347-
* - ::include?, ::has_key?, ::key?, ::member?:: Returns whether the given name
7348-
is in \ENV.
7349-
* - ::key:: Returns the name of the first entry with the given value.
7350-
* - ::size, ::length:: Returns the number of entries.
7351-
* - ::value?:: Returns whether any entry has the given value.
7344+
* - ::[]: Returns the value for the given environment variable name if it exists:
7345+
* - ::empty?: Returns whether \ENV is empty.
7346+
* - ::has_value?, ::value?: Returns whether the given value is in \ENV.
7347+
* - ::include?, ::has_key?, ::key?, ::member?: Returns whether the given name
7348+
is in \ENV.
7349+
* - ::key: Returns the name of the first entry with the given value.
7350+
* - ::size, ::length: Returns the number of entries.
7351+
* - ::value?: Returns whether any entry has the given value.
73527352
*
73537353
* === Methods for Assigning
73547354
*
7355-
* - ::[]=, ::store:: Creates, updates, or deletes the named environment variable.
7356-
* - ::clear:: Removes every environment variable; returns \ENV:
7357-
* - ::update, ::merge!:: Adds to \ENV each key/value pair in the given hash.
7358-
* - ::replace:: Replaces the entire content of the \ENV
7359-
* with the name/value pairs in the given hash.
7355+
* - ::[]=, ::store: Creates, updates, or deletes the named environment variable.
7356+
* - ::clear: Removes every environment variable; returns \ENV:
7357+
* - ::update, ::merge!: Adds to \ENV each key/value pair in the given hash.
7358+
* - ::replace: Replaces the entire content of the \ENV
7359+
* with the name/value pairs in the given hash.
73607360
*
73617361
* === Methods for Deleting
73627362
*
7363-
* - ::delete:: Deletes the named environment variable name if it exists.
7364-
* - ::delete_if:: Deletes entries selected by the block.
7365-
* - ::keep_if:: Deletes entries not selected by the block.
7366-
* - ::reject!:: Similar to #delete_if, but returns +nil+ if no change was made.
7367-
* - ::select!, ::filter!:: Deletes entries selected by the block.
7368-
* - ::shift:: Removes and returns the first entry.
7363+
* - ::delete: Deletes the named environment variable name if it exists.
7364+
* - ::delete_if: Deletes entries selected by the block.
7365+
* - ::keep_if: Deletes entries not selected by the block.
7366+
* - ::reject!: Similar to #delete_if, but returns +nil+ if no change was made.
7367+
* - ::select!, ::filter!: Deletes entries selected by the block.
7368+
* - ::shift: Removes and returns the first entry.
73697369
*
73707370
* === Methods for Iterating
73717371
*
7372-
* - ::each, ::each_pair:: Calls the block with each name/value pair.
7373-
* - ::each_key:: Calls the block with each name.
7374-
* - ::each_value:: Calls the block with each value.
7372+
* - ::each, ::each_pair: Calls the block with each name/value pair.
7373+
* - ::each_key: Calls the block with each name.
7374+
* - ::each_value: Calls the block with each value.
73757375
*
73767376
* === Methods for Converting
73777377
*
7378-
* - ::assoc:: Returns a 2-element array containing the name and value
7379-
* of the named environment variable if it exists:
7380-
* - ::clone:: Returns \ENV (and issues a warning).
7381-
* - ::except:: Returns a hash of all name/value pairs except those given.
7382-
* - ::fetch:: Returns the value for the given name.
7383-
* - ::inspect:: Returns the contents of \ENV as a string.
7384-
* - ::invert:: Returns a hash whose keys are the ENV values,
7385-
and whose values are the corresponding ENV names.
7386-
* - ::keys:: Returns an array of all names.
7387-
* - ::rassoc:: Returns the name and value of the first found entry
7388-
* that has the given value.
7389-
* - ::reject:: Returns a hash of those entries not rejected by the block.
7390-
* - ::select, ::filter:: Returns a hash of name/value pairs selected by the block.
7391-
* - ::slice:: Returns a hash of the given names and their corresponding values.
7392-
* - ::to_a:: Returns the entries as an array of 2-element Arrays.
7393-
* - ::to_h:: Returns a hash of entries selected by the block.
7394-
* - ::to_hash:: Returns a hash of all entries.
7395-
* - ::to_s:: Returns the string <tt>'ENV'</tt>.
7396-
* - ::values:: Returns all values as an array.
7397-
* - ::values_at:: Returns an array of the values for the given name.
7378+
* - ::assoc: Returns a 2-element array containing the name and value
7379+
* of the named environment variable if it exists:
7380+
* - ::clone: Returns \ENV (and issues a warning).
7381+
* - ::except: Returns a hash of all name/value pairs except those given.
7382+
* - ::fetch: Returns the value for the given name.
7383+
* - ::inspect: Returns the contents of \ENV as a string.
7384+
* - ::invert: Returns a hash whose keys are the ENV values,
7385+
and whose values are the corresponding ENV names.
7386+
* - ::keys: Returns an array of all names.
7387+
* - ::rassoc: Returns the name and value of the first found entry
7388+
* that has the given value.
7389+
* - ::reject: Returns a hash of those entries not rejected by the block.
7390+
* - ::select, ::filter: Returns a hash of name/value pairs selected by the block.
7391+
* - ::slice: Returns a hash of the given names and their corresponding values.
7392+
* - ::to_a: Returns the entries as an array of 2-element Arrays.
7393+
* - ::to_h: Returns a hash of entries selected by the block.
7394+
* - ::to_hash: Returns a hash of all entries.
7395+
* - ::to_s: Returns the string <tt>'ENV'</tt>.
7396+
* - ::values: Returns all values as an array.
7397+
* - ::values_at: Returns an array of the values for the given name.
73987398
*
73997399
* === More Methods
74007400
*
7401-
* - ::dup:: Raises an exception.
7402-
* - ::freeze:: Raises an exception.
7403-
* - ::rehash:: Returns +nil+, without modifying \ENV.
7401+
* - ::dup: Raises an exception.
7402+
* - ::freeze: Raises an exception.
7403+
* - ::rehash: Returns +nil+, without modifying \ENV.
74047404
*
74057405
*/
74067406

0 commit comments

Comments
 (0)