diff options
author | Peter Zhu <[email protected]> | 2024-10-02 13:55:43 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-10-03 09:28:13 -0400 |
commit | f56be4286f70734ead11b316b85f504ca5b6c6dc (patch) | |
tree | a4696d883c04c03fc9cff8cfce70e071ea0d3dc9 /range.c | |
parent | 66124cdb17f5152e7b1b269ca62be1773b127b2b (diff) |
[DOC] Add pound sign before all <=> methods
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11769
Diffstat (limited to 'range.c')
-rw-r--r-- | range.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1471,7 +1471,7 @@ range_last(int argc, VALUE *argv, VALUE range) * min(n) {|a, b| ... } -> array * * Returns the minimum value in +self+, - * using method <tt><=></tt> or a given block for comparison. + * using method <tt>#<=></tt> or a given block for comparison. * * With no argument and no block given, * returns the minimum-valued element of +self+. @@ -1579,7 +1579,7 @@ range_min(int argc, VALUE *argv, VALUE range) * max(n) {|a, b| ... } -> array * * Returns the maximum value in +self+, - * using method <tt><=></tt> or a given block for comparison. + * using method <tt>#<=></tt> or a given block for comparison. * * With no argument and no block given, * returns the maximum-valued element of +self+. @@ -1698,10 +1698,10 @@ range_max(int argc, VALUE *argv, VALUE range) * minmax {|a, b| ... } -> [object, object] * * Returns a 2-element array containing the minimum and maximum value in +self+, - * either according to comparison method <tt><=></tt> or a given block. + * either according to comparison method <tt>#<=></tt> or a given block. * * With no block given, returns the minimum and maximum values, - * using <tt><=></tt> for comparison: + * using <tt>#<=></tt> for comparison: * * (1..4).minmax # => [1, 4] * (1...4).minmax # => [1, 3] @@ -2151,7 +2151,7 @@ static int r_cover_range_p(VALUE range, VALUE beg, VALUE end, VALUE val); * Returns +false+ if either: * * - The begin value of +self+ is larger than its end value. - * - An internal call to <tt><=></tt> returns +nil+; + * - An internal call to <tt>#<=></tt> returns +nil+; * that is, the operands are not comparable. * * Beginless ranges cover all values of the same type before the end, @@ -2399,7 +2399,7 @@ empty_region_p(VALUE beg, VALUE end, int excl) * * (1..3).overlap?(1) # TypeError * - * Returns +false+ if an internal call to <tt><=></tt> returns +nil+; + * Returns +false+ if an internal call to <tt>#<=></tt> returns +nil+; * that is, the operands are not comparable. * * (1..3).overlap?('a'..'d') # => false @@ -2589,7 +2589,7 @@ range_overlap(VALUE range, VALUE other) * == Ranges and Other Classes * * An object may be put into a range if its class implements - * instance method <tt><=></tt>. + * instance method <tt>#<=></tt>. * Ruby core classes that do so include Array, Complex, File::Stat, * Float, Integer, Kernel, Module, Numeric, Rational, String, Symbol, and Time. * @@ -2621,15 +2621,15 @@ range_overlap(VALUE range, VALUE other) * == Ranges and User-Defined Classes * * A user-defined class that is to be used in a range - * must implement instance <tt><=></tt>; + * must implement instance <tt>#<=></tt>; * see Integer#<=>. * To make iteration available, it must also implement * instance method +succ+; see Integer#succ. * - * The class below implements both <tt><=></tt> and +succ+, + * The class below implements both <tt>#<=></tt> and +succ+, * and so can be used both to construct ranges and to iterate over them. * Note that the Comparable module is included - * so the <tt>==</tt> method is defined in terms of <tt><=></tt>. + * so the <tt>==</tt> method is defined in terms of <tt>#<=></tt>. * * # Represent a string of 'X' characters. * class Xs |