1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix documentation of #<=> and #casecmp [ci skip]

Descriptions for return values of -1 and 1 were reversed.
This commit is contained in:
Troy Chance 2021-08-01 20:09:07 -07:00 committed by GitHub
parent 378e8cdad6
commit 7f4e86804d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2021-08-02 12:09:26 +09:00
Merged: https://github.com/ruby/ruby/pull/4698

Merged-By: nobu <nobu@ruby-lang.org>

View file

@ -3447,9 +3447,9 @@ rb_str_eql(VALUE str1, VALUE str2)
* string <=> other_string -> -1, 0, 1, or nil
*
* Compares +self+ and +other_string+, returning:
* - -1 if +other_string+ is smaller.
* - -1 if +other_string+ is larger.
* - 0 if the two are equal.
* - 1 if +other_string+ is larger.
* - 1 if +other_string+ is smaller.
* - +nil+ if the two are incomparable.
*
* Examples:
@ -3481,9 +3481,9 @@ static VALUE str_casecmp_p(VALUE str1, VALUE str2);
* str.casecmp(other_str) -> -1, 0, 1, or nil
*
* Compares +self+ and +other_string+, ignoring case, and returning:
* - -1 if +other_string+ is smaller.
* - -1 if +other_string+ is larger.
* - 0 if the two are equal.
* - 1 if +other_string+ is larger.
* - 1 if +other_string+ is smaller.
* - +nil+ if the two are incomparable.
*
* Examples: