summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-13 22:36:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-13 22:36:17 +0000
commit2f83b32f7123508239da5ed670a45e831d614ac7 (patch)
tree10dd114426b6023b6167baa6987403267affc4c4 /enum.c
parent2f00c56eb78696dc30b7d218bd32f10b9e96028a (diff)
update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/enum.c b/enum.c
index 633fa54..b6bcd5c 100644
--- a/enum.c
+++ b/enum.c
@@ -1499,8 +1499,8 @@ max_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
* 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, args))
* 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.