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

ruby-changes:35828

From: akr <ko1@a...>
Date: Tue, 14 Oct 2014 07:36:33 +0900 (JST)
Subject: [ruby-changes:35828] akr:r47910 (trunk): update doc.

akr	2014-10-14 07:36:17 +0900 (Tue, 14 Oct 2014)

  New Revision: 47910

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

  Log:
    update doc.

  Modified files:
    trunk/enum.c
Index: enum.c
===================================================================
--- enum.c	(revision 47909)
+++ enum.c	(revision 47910)
@@ -1499,8 +1499,8 @@ max_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, arg https://github.com/ruby/ruby/blob/trunk/enum.c#L1499
  *  as an array.
  *
  *     a = %w[albatross dog horse]
- *     a.max(2)                                  #=> ["dog", "horse"]
- *     a.max(2) {|a, b| a.length <=> b.length }  #=> ["horse", "albatross"]
+ *     a.max(2)                                  #=> ["horse", "dog"]
+ *     a.max(2) {|a, b| a.length <=> b.length }  #=> ["albatross", "horse"]
  */
 
 static VALUE
@@ -1778,7 +1778,7 @@ max_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, a https://github.com/ruby/ruby/blob/trunk/enum.c#L1778
  *  as an array.
  *
  *     a = %w[albatross dog horse]
- *     a.max_by(2) {|x| x.length } #=> ["horse", "albatross"]
+ *     a.max_by(2) {|x| x.length } #=> ["albatross", "horse"]
  *
  *  enum.max_by(n) can be used to implement weighted random sampling.
  *  Following example implements and use Enumerable#wsample.

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

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