[前][次][番号順一覧][スレッド一覧]

ruby-changes:70520

From: nagachika <ko1@a...>
Date: Fri, 24 Dec 2021 15:04:54 +0900 (JST)
Subject: [ruby-changes:70520] badffc7bee (ruby_3_0): merge revision(s) 7f4e86804d426d79807cc038fe4444f7c65f5c4a: [Backport #18163]

https://git.ruby-lang.org/ruby.git/commit/?id=badffc7bee

From badffc7bee32251e2bea5897dc502b887e7ffa9b Mon Sep 17 00:00:00 2001
From: nagachika <nagachika@r...>
Date: Fri, 24 Dec 2021 14:35:34 +0900
Subject: 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(-)
---
 string.c  | 8 ++++----
 version.h | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/string.c b/string.c
index 7fb45c1f72f..1db7acc8c8d 100644
--- a/string.c
+++ b/string.c
@@ -3454,9 +3454,9 @@ rb_str_eql(VALUE str1, VALUE str2) https://github.com/ruby/ruby/blob/trunk/string.c#L3454
  *    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); https://github.com/ruby/ruby/blob/trunk/string.c#L3488
  *    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:
diff --git a/version.h b/version.h
index 1cdc1f413f7..6903a7c6821 100644
--- a/version.h
+++ b/version.h
@@ -12,11 +12,11 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L12
 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
 #define RUBY_VERSION_TEENY 4
 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 160
+#define RUBY_PATCHLEVEL 161
 
 #define RUBY_RELEASE_YEAR 2021
 #define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 2
+#define RUBY_RELEASE_DAY 24
 
 #include "ruby/version.h"
 
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]