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

ruby-changes:39778

From: nobu <ko1@a...>
Date: Tue, 15 Sep 2015 12:49:18 +0900 (JST)
Subject: [ruby-changes:39778] nobu:r51859 (trunk): array.c: [DOC] correct Array#sort rdoc [ci skip]

nobu	2015-09-15 12:49:12 +0900 (Tue, 15 Sep 2015)

  New Revision: 51859

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51859

  Log:
    array.c: [DOC] correct Array#sort rdoc [ci skip]
    
    * array.c (rb_ary_sort_bang, rb_ary_sort): [DOC] Correct
      description of array sort block return values.  And also fix up
      the grammar a bit.  [Fix GH-1020]

  Modified files:
    trunk/ChangeLog
    trunk/array.c
Index: array.c
===================================================================
--- array.c	(revision 51858)
+++ array.c	(revision 51859)
@@ -2445,9 +2445,9 @@ sort_2(const void *ap, const void *bp, v https://github.com/ruby/ruby/blob/trunk/array.c#L2445
  *  Comparisons for the sort will be done using the <code><=></code> operator
  *  or using an optional code block.
  *
- *  The block must implement a comparison between +a+ and +b+, and return
- *  +-1+, when +a+ follows +b+, +0+ when +a+ and +b+ are equivalent, or ++1+
- *  if +b+ follows +a+.
+ *  The block must implement a comparison between +a+ and +b+ and return
+ *  +-1+ when +b+ follows +a+, +0+ when +a+ and +b+ are equivalent, or ++1+
+ *  when +a+ follows +b+.
  *
  *  See also Enumerable#sort_by.
  *
@@ -2526,9 +2526,9 @@ rb_ary_sort_bang(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L2526
  *  Comparisons for the sort will be done using the <code><=></code> operator
  *  or using an optional code block.
  *
- *  The block must implement a comparison between +a+ and +b+, and return
- *  +-1+, when +a+ follows +b+, +0+ when +a+ and +b+ are equivalent, or ++1+
- *  if +b+ follows +a+.
+ *  The block must implement a comparison between +a+ and +b+ and return
+ *  +-1+ when +b+ follows +a+, +0+ when +a+ and +b+ are equivalent, or ++1+
+ *  when +a+ follows +b+.
  *
  *
  *  See also Enumerable#sort_by.
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51858)
+++ ChangeLog	(revision 51859)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Sep 15 12:49:10 2015  Jason Barnabe  <jason.barnabe@g...>
+
+	* array.c (rb_ary_sort_bang, rb_ary_sort): [DOC] Correct
+	  description of array sort block return values.  And also fix up
+	  the grammar a bit.  [Fix GH-1020]
+
 Tue Sep 15 12:44:32 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* util.c (ruby_qsort): use BSD-style qsort_r if available.

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

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