зеркало из https://github.com/github/ruby.git
update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2f00c56eb7
Коммит
2f83b32f71
6
enum.c
6
enum.c
|
@ -1499,8 +1499,8 @@ max_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
|
||||||
* as an array.
|
* as an array.
|
||||||
*
|
*
|
||||||
* a = %w[albatross dog horse]
|
* a = %w[albatross dog horse]
|
||||||
* a.max(2) #=> ["dog", "horse"]
|
* a.max(2) #=> ["horse", "dog"]
|
||||||
* a.max(2) {|a, b| a.length <=> b.length } #=> ["horse", "albatross"]
|
* a.max(2) {|a, b| a.length <=> b.length } #=> ["albatross", "horse"]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
@ -1778,7 +1778,7 @@ max_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
|
||||||
* as an array.
|
* as an array.
|
||||||
*
|
*
|
||||||
* a = %w[albatross dog horse]
|
* 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.
|
* enum.max_by(n) can be used to implement weighted random sampling.
|
||||||
* Following example implements and use Enumerable#wsample.
|
* Following example implements and use Enumerable#wsample.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче