diff options
author | nagachika <nagachika@ruby-lang.org> | 2021-12-24 14:35:34 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2021-12-24 14:35:34 +0900 |
commit | badffc7bee32251e2bea5897dc502b887e7ffa9b (patch) | |
tree | 305d4cb1df7a51229b215e7d08a3d538c01432fb /string.c | |
parent | 69272c74a3f675373fc6c6f32b685620da8a85ee (diff) |
merge revision(s) 7f4e86804d426d79807cc038fe4444f7c65f5c4a: [Backport #18163]
Fix documentation of #<=> and #casecmp [ci skip]
Descriptions for return values of -1 and 1 were reversed.
---
string.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3454,9 +3454,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: @@ -3488,9 +3488,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: |