[DOC] Array comparing doc (#11486)
This commit is contained in:
parent
d25833b81a
commit
dba9601e0f
Notes:
git
2024-08-28 21:17:41 +00:00
Merged-By: peterzhu2118 <peter@peterzhu.ca>
5
array.c
5
array.c
@ -5194,6 +5194,8 @@ recursive_equal(VALUE ary1, VALUE ary2, int recur)
|
|||||||
*
|
*
|
||||||
* This method is different from method Array#eql?,
|
* This method is different from method Array#eql?,
|
||||||
* which compares elements using <tt>Object#eql?</tt>.
|
* which compares elements using <tt>Object#eql?</tt>.
|
||||||
|
*
|
||||||
|
* Related: see {Methods for Comparing}[rdoc-ref:Array@Methods+for+Comparing].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
@ -5383,6 +5385,7 @@ recursive_cmp(VALUE ary1, VALUE ary2, int recur)
|
|||||||
* [0, 1, 2] <=> [0, 1, 2, 0] # => -1
|
* [0, 1, 2] <=> [0, 1, 2, 0] # => -1
|
||||||
* [0, 1, 2] <=> [0, 1, 2, 3] # => -1
|
* [0, 1, 2] <=> [0, 1, 2, 3] # => -1
|
||||||
*
|
*
|
||||||
|
* Related: see {Methods for Comparing}[rdoc-ref:Array@Methods+for+Comparing].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
@ -8566,7 +8569,7 @@ rb_ary_deconstruct(VALUE ary)
|
|||||||
*
|
*
|
||||||
* === Methods for Comparing
|
* === Methods for Comparing
|
||||||
*
|
*
|
||||||
* - #<=>: Returns -1, 0, or 1 * as +self+ is less than, equal to, or
|
* - #<=>: Returns -1, 0, or 1, as +self+ is less than, equal to, or
|
||||||
* greater than a given object.
|
* greater than a given object.
|
||||||
* - #==: Returns whether each element in +self+ is <tt>==</tt> to the corresponding element
|
* - #==: Returns whether each element in +self+ is <tt>==</tt> to the corresponding element
|
||||||
* in a given object.
|
* in a given object.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user