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

ruby-changes:45850

From: naruse <ko1@a...>
Date: Mon, 13 Mar 2017 01:27:48 +0900 (JST)
Subject: [ruby-changes:45850] naruse:r57925 (ruby_2_4): merge revision(s) 57771:

naruse	2017-03-13 01:27:45 +0900 (Mon, 13 Mar 2017)

  New Revision: 57925

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

  Log:
    merge revision(s) 57771:
    
    documentation for sort methods
    
    * array.c: [DOC] fix grammar in Array#sort, #sort!, #sort_by!,
      move references below the code example, add a missing reference.
    * enum.c: [DOC] fix grammar in Enumerable#sort, #sort_by.

  Modified directories:
    branches/ruby_2_4/
  Modified files:
    branches/ruby_2_4/array.c
    branches/ruby_2_4/enum.c
    branches/ruby_2_4/version.h
Index: ruby_2_4/enum.c
===================================================================
--- ruby_2_4/enum.c	(revision 57924)
+++ ruby_2_4/enum.c	(revision 57925)
@@ -935,7 +935,7 @@ enum_first(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L935
  *  an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
  *  are equivalent, or an integer greater than 0 when +a+ follows +b+.
  *
- *  The result is not guaranteed as stable.  When comparison of two
+ *  The result is not guaranteed to be stable.  When the comparison of two
  *  elements returns +0+, the order of the elements is unpredictable.
  *
  *     %w(rhea kea flea).sort           #=> ["flea", "kea", "rhea"]
@@ -1011,7 +1011,7 @@ sort_by_cmp(const void *ap, const void * https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L1011
  *  Sorts <i>enum</i> using a set of keys generated by mapping the
  *  values in <i>enum</i> through the given block.
  *
- *  The result is not guaranteed as stable.  When two keys are equal,
+ *  The result is not guaranteed to be stable.  When two keys are equal,
  *  the order of the corresponding elements is unpredictable.
  *
  *  If no block is given, an enumerator is returned instead.
Index: ruby_2_4/array.c
===================================================================
--- ruby_2_4/array.c	(revision 57924)
+++ ruby_2_4/array.c	(revision 57925)
@@ -2437,14 +2437,14 @@ sort_2(const void *ap, const void *bp, v https://github.com/ruby/ruby/blob/trunk/ruby_2_4/array.c#L2437
  *  an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
  *  are equivalent, or an integer greater than 0 when +a+ follows +b+.
  *
- *  The result is not guaranteed as stable.  When comparison of two
+ *  The result is not guaranteed to be stable.  When the comparison of two
  *  elements returns +0+, the order of the elements is unpredictable.
  *
- *  See also Enumerable#sort_by.
- *
  *     a = [ "d", "a", "e", "c", "b" ]
  *     a.sort!                    #=> ["a", "b", "c", "d", "e"]
  *     a.sort! { |x,y| y <=> x }  #=> ["e", "d", "c", "b", "a"]
+ *
+ *  See also Enumerable#sort_by.
  */
 
 VALUE
@@ -2521,14 +2521,14 @@ rb_ary_sort_bang(VALUE ary) https://github.com/ruby/ruby/blob/trunk/ruby_2_4/array.c#L2521
  *  an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
  *  are equivalent, or an integer greater than 0 when +a+ follows +b+.
  *
- *  The result is not guaranteed as stable.  When comparison of two
+ *  The result is not guaranteed to be stable.  When the comparison of two
  *  elements returns +0+, the order of the elements is unpredictable.
  *
- *  See also Enumerable#sort_by.
- *
  *     a = [ "d", "a", "e", "c", "b" ]
  *     a.sort                    #=> ["a", "b", "c", "d", "e"]
  *     a.sort { |x,y| y <=> x }  #=> ["e", "d", "c", "b", "a"]
+ *
+ *  See also Enumerable#sort_by.
  */
 
 VALUE
@@ -2680,11 +2680,12 @@ sort_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, https://github.com/ruby/ruby/blob/trunk/ruby_2_4/array.c#L2680
  *  Sorts +self+ in place using a set of keys generated by mapping the
  *  values in +self+ through the given block.
  *
- *  The result is not guaranteed as stable.  When two keys are equal,
+ *  The result is not guaranteed to be stable.  When two keys are equal,
  *  the order of the corresponding elements is unpredictable.
  *
  *  If no block is given, an Enumerator is returned instead.
  *
+ *  See also Enumerable#sort_by.
  */
 
 static VALUE
Index: ruby_2_4/version.h
===================================================================
--- ruby_2_4/version.h	(revision 57924)
+++ ruby_2_4/version.h	(revision 57925)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1
 #define RUBY_VERSION "2.4.0"
 #define RUBY_RELEASE_DATE "2017-03-13"
-#define RUBY_PATCHLEVEL 80
+#define RUBY_PATCHLEVEL 81
 
 #define RUBY_RELEASE_YEAR 2017
 #define RUBY_RELEASE_MONTH 3

Property changes on: ruby_2_4
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r57771


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

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