[前][次][番号順一覧][スレッド一覧]

ruby-changes:71566

From: Burdette <ko1@a...>
Date: Thu, 31 Mar 2022 03:46:34 +0900 (JST)
Subject: [ruby-changes:71566] ffcdbedbfb (master): Repaired What's Here sections for Range, String, Symbol, Struct (#5735)

https://git.ruby-lang.org/ruby.git/commit/?id=ffcdbedbfb

From ffcdbedbfb7fc37564ea046d381954eb53eaf6f9 Mon Sep 17 00:00:00 2001
From: Burdette Lamar <BurdetteLamar@Y...>
Date: Wed, 30 Mar 2022 13:46:24 -0500
Subject: Repaired What's Here sections for Range, String, Symbol, Struct
 (#5735)

Repaired What's Here sections for Range, String, Symbol, Struct.
---
 range.c  |  52 ++++-----
 string.c | 369 ++++++++++++++++++++++++++++++++-------------------------------
 struct.c |  44 ++++----
 3 files changed, 233 insertions(+), 232 deletions(-)

diff --git a/range.c b/range.c
index 0e04071ca6..e0d27012b4 100644
--- a/range.c
+++ b/range.c
@@ -2224,44 +2224,44 @@ range_count(int argc, VALUE *argv, VALUE range) https://github.com/ruby/ruby/blob/trunk/range.c#L2224
  *
  * === Methods for Creating a \Range
  *
- * - ::new:: Returns a new range.
+ * - ::new: Returns a new range.
  *
  * === Methods for Querying
  *
- * - #begin:: Returns the begin value given for +self+.
- * - #bsearch:: Returns an element from +self+ selected by a binary search.
- * - #count:: Returns a count of elements in +self+.
- * - #end:: Returns the end value given for +self+.
- * - #exclude_end?:: Returns whether the end object is excluded.
- * - #first:: Returns the first elements of +self+.
- * - #hash:: Returns the integer hash code.
- * - #last:: Returns the last elements of +self+.
- * - #max:: Returns the maximum values in +self+.
- * - #min:: Returns the minimum values in +self+.
- * - #minmax:: Returns the minimum and maximum values in +self+.
- * - #size:: Returns the count of elements in +self+.
+ * - #begin: Returns the begin value given for +self+.
+ * - #bsearch: Returns an element from +self+ selected by a binary search.
+ * - #count: Returns a count of elements in +self+.
+ * - #end: Returns the end value given for +self+.
+ * - #exclude_end?: Returns whether the end object is excluded.
+ * - #first: Returns the first elements of +self+.
+ * - #hash: Returns the integer hash code.
+ * - #last: Returns the last elements of +self+.
+ * - #max: Returns the maximum values in +self+.
+ * - #min: Returns the minimum values in +self+.
+ * - #minmax: Returns the minimum and maximum values in +self+.
+ * - #size: Returns the count of elements in +self+.
  *
  * === Methods for Comparing
  *
- * - #==:: Returns whether a given object is equal to +self+ (uses #==).
- * - #===:: Returns whether the given object is between the begin and end values.
- * - #cover?:: Returns whether a given object is within +self+.
- * - #eql?:: Returns whether a given object is equal to +self+ (uses #eql?).
- * - #include? (aliased as #member?):: Returns whether a given object
- *                                     is an element of +self+.
+ * - #==: Returns whether a given object is equal to +self+ (uses #==).
+ * - #===: Returns whether the given object is between the begin and end values.
+ * - #cover?: Returns whether a given object is within +self+.
+ * - #eql?: Returns whether a given object is equal to +self+ (uses #eql?).
+ * - #include? (aliased as #member?): Returns whether a given object
+ *   is an element of +self+.
  *
  * === Methods for Iterating
  *
- * - #%:: Requires argument +n+; calls the block with each +n+-th element of +self+.
- * - #each:: Calls the block with each element of +self+.
- * - #step:: Takes optional argument +n+ (defaults to 1);
-             calls the block with each +n+-th element of +self+.
+ * - #%: Requires argument +n+; calls the block with each +n+-th element of +self+.
+ * - #each: Calls the block with each element of +self+.
+ * - #step: Takes optional argument +n+ (defaults to 1);
+     calls the block with each +n+-th element of +self+.
  *
  * === Methods for Converting
  *
- * - #inspect:: Returns a string representation of +self+ (uses #inspect).
- * - #to_a (aliased as #entries):: Returns elements of +self+ in an array.
- * - #to_s:: Returns a string representation of +self+ (uses #to_s).
+ * - #inspect: Returns a string representation of +self+ (uses #inspect).
+ * - #to_a (aliased as #entries): Returns elements of +self+ in an array.
+ * - #to_s: Returns a string representation of +self+ (uses #to_s).
  *
  */
 
diff --git a/string.c b/string.c
index 04aee84f91..640b5b6c73 100644
--- a/string.c
+++ b/string.c
@@ -11386,49 +11386,49 @@ rb_str_unicode_normalized_p(int argc, VALUE *argv, VALUE str) https://github.com/ruby/ruby/blob/trunk/string.c#L11386
  *
  * === Methods for Querying
  *
- * - ::all_symbols:: Returns an array of the symbols currently in Ruby's symbol table.
- * - #=~:: Returns the index of the first substring in symbol that matches a
- *         given Regexp or other object; returns +nil+ if no match is found.
- * - #[], #slice :: Returns a substring of symbol
- *                  determined by a given index, start/length, or range, or string.
- * - #empty?:: Returns +true+ if +self.length+ is zero; +false+ otherwise.
- * - #encoding:: Returns the Encoding object that represents the encoding
- *               of symbol.
- * - #end_with?:: Returns +true+ if symbol ends with
- *                any of the given strings.
- * - #match:: Returns a MatchData object if symbol
- *            matches a given Regexp; +nil+ otherwise.
- * - #match?:: Returns +true+ if symbol
- *             matches a given Regexp; +false+ otherwise.
- * - #length, #size:: Returns the number of characters in symbol.
- * - #start_with?:: Returns +true+ if symbol starts with
- *                  any of the given strings.
+ * - ::all_symbols: Returns an array of the symbols currently in Ruby's symbol table.
+ * - #=~: Returns the index of the first substring in symbol that matches a
+ *   given Regexp or other object; returns +nil+ if no match is found.
+ * - #[], #slice : Returns a substring of symbol
+ *   determined by a given index, start/length, or range, or string.
+ * - #empty?: Returns +true+ if +self.length+ is zero; +false+ otherwise.
+ * - #encoding: Returns the Encoding object that represents the encoding
+ *   of symbol.
+ * - #end_with?: Returns +true+ if symbol ends with
+ *   any of the given strings.
+ * - #match: Returns a MatchData object if symbol
+ *   matches a given Regexp; +nil+ otherwise.
+ * - #match?: Returns +true+ if symbol
+ *   matches a given Regexp; +false+ otherwise.
+ * - #length, #size: Returns the number of characters in symbol.
+ * - #start_with?: Returns +true+ if symbol starts with
+ *   any of the given strings.
  *
  * === Methods for Comparing
  *
- * - #<=>:: Returns -1, 0, or 1 as a given symbol is smaller than, equal to,
- *          or larger than symbol.
- * - #==, #===:: Returns +true+ if a given symbol has the same content and
- *               encoding.
- * - #casecmp:: Ignoring case, returns -1, 0, or 1 as a given
- *              symbol is smaller than, equal to, or larger than symbol.
- * - #casecmp?:: Returns +true+ if symbol is equal to a given symbol
- *               after Unicode case folding; +false+ otherwise.
+ * - #<=>: Returns -1, 0, or 1 as a given symbol is smaller than, equal to,
+ *   or larger than symbol.
+ * - #==, #===: Returns +true+ if a given symbol has the same content and
+ *   encoding.
+ * - #casecmp: Ignoring case, returns -1, 0, or 1 as a given
+ *   symbol is smaller than, equal to, or larger than symbol.
+ * - #casecmp?: Returns +true+ if symbol is equal to a given symbol
+ *   after Unicode case folding; +false+ otherwise.
  *
  * === Methods for Converting
  *
- * - #capitalize:: Returns symbol with the first character upcased
- *                 and all other characters downcased.
- * - #downcase:: Returns symbol with all characters downcased.
- * - #inspect:: Returns the string representation of +self+ as a symbol literal.
- * - #name:: Returns the frozen string corresponding to symbol.
- * - #succ, #next:: Returns the symbol that is the successor to symbol.
- * - #swapcase:: Returns symbol with all upcase characters downcased
- *               and all downcase characters upcased.
- * - #to_proc:: Returns a Proc object which responds to the method named by symbol.
- * - #to_s, #id2name:: Returns the string corresponding to +self+.
- * - #to_sym, #intern:: Returns +self+.
- * - #upcase:: Returns symbol with all characters upcased.
+ * - #capitalize: Returns symbol with the first character upcased
+ *   and all other characters downcased.
+ * - #downcase: Returns symbol with all characters downcased.
+ * - #inspect: Returns the string representation of +self+ as a symbol literal.
+ * - #name: Returns the frozen string corresponding to symbol.
+ * - #succ, #next: Returns the symbol that is the successor to symbol.
+ * - #swapcase: Returns symbol with all upcase characters downcased
+ *   and all downcase characters upcased.
+ * - #to_proc: Returns a Proc object which responds to the method named by symbol.
+ * - #to_s, #id2name: Returns the string corresponding to +self+.
+ * - #to_sym, #intern: Returns +self+.
+ * - #upcase: Returns symbol with all characters upcased.
  *
  */
 
@@ -12214,63 +12214,63 @@ rb_enc_interned_str_cstr(const char *ptr, rb_encoding *enc) https://github.com/ruby/ruby/blob/trunk/string.c#L12214
  *
  *  === Methods for Creating a \String
  *
- *  - ::new:: Returns a new string.
- *  - ::try_convert:: Returns a new string created from a given object.
+ *  - ::new: Returns a new string.
+ *  - ::try_convert: Returns a new string created from a given object.
  *
  *  === Methods for a Frozen/Unfrozen String
  *
- *  - #+@:: Returns a string that is not frozen: +self+, if not frozen;
- *          +self.dup+ otherwise.
- *  - #-@:: Returns a string that is frozen: +self+, if already frozen;
- *          +self.freeze+ otherwise.
- *  - #freeze:: Freezes +self+, if not already frozen; returns +self+.
+ *  - #+@: Returns a string that is not frozen: +self+, if not frozen;
+ *    +self.dup+ otherwise.
+ *  - #-@: Returns a string that is frozen: +self+, if already frozen;
+ *    +self.freeze+ otherwise.
+ *  - #freeze: Freezes +self+, if not already frozen; returns +self+.
  (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]