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

ruby-changes:59416

From: Marcus <ko1@a...>
Date: Mon, 23 Dec 2019 23:10:32 +0900 (JST)
Subject: [ruby-changes:59416] 16fddfe352 (master): [DOC] Improve readability of requirements for <=>

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

From 16fddfe352828d26aaa6cdbce696e62de04511ce Mon Sep 17 00:00:00 2001
From: Marcus Stollsteimer <sto.mar@w...>
Date: Mon, 23 Dec 2019 15:02:59 +0100
Subject: [DOC] Improve readability of requirements for <=>


diff --git a/compar.c b/compar.c
index e9b1d4b..94072c9 100644
--- a/compar.c
+++ b/compar.c
@@ -253,9 +253,9 @@ cmp_clamp(int argc, VALUE *argv, VALUE x) https://github.com/ruby/ruby/blob/trunk/compar.c#L253
 /*
  *  The Comparable mixin is used by classes whose objects may be
  *  ordered. The class must define the <code><=></code> operator,
- *  which compares the receiver against another object, returning
- *  a value less than 0, 0, or a value greater than 0, depending on
- *  whether the receiver is less than, equal to,
+ *  which compares the receiver against another object, returning a
+ *  value less than 0, returning 0, or returning a value greater than 0,
+ *  depending on whether the receiver is less than, equal to,
  *  or greater than the other object. If the other object is not
  *  comparable then the <code><=></code> operator should return +nil+.
  *  Comparable uses <code><=></code> to implement the conventional
-- 
cgit v0.10.2


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

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