summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorTroy Chance <10200447+sftroychance@users.noreply.github.com>2021-08-01 20:09:07 -0700
committerGitHub <noreply@github.com>2021-08-02 12:09:07 +0900
commit7f4e86804d426d79807cc038fe4444f7c65f5c4a (patch)
tree7b409bf533d5666d28ce8c983ec9e26bd2933e96 /string.c
parent378e8cdad69e6ba995a024da2957719789f0679e (diff)
Fix documentation of #<=> and #casecmp [ci skip]
Descriptions for return values of -1 and 1 were reversed.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4698 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'string.c')
-rw-r--r--string.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/string.c b/string.c
index 2c0140a02c..2048b5b3ea 100644
--- a/string.c
+++ b/string.c
@@ -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: