mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* enum.c: Add reduce/inject alias note.
[fix GH-1400][ci skip] Patch by @getaaron git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dd3b3d716e
commit
364a0879c9
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Oct 6 10:37:13 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
|
||||
* enum.c: Add reduce/inject alias note.
|
||||
[fix GH-1400][ci skip] Patch by @getaaron
|
||||
|
||||
Thu Oct 6 10:30:27 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* thread.c (update_coverage): check coverage values, and ignore
|
||||
|
|
3
enum.c
3
enum.c
|
@ -705,6 +705,9 @@ ary_inject_op(VALUE ary, VALUE init, VALUE op)
|
|||
* operation, specified by a block or a symbol that names a
|
||||
* method or operator.
|
||||
*
|
||||
* The <i>inject</i> and <i>reduce</i> methods are aliases. There
|
||||
* is no performance benefit to either.
|
||||
*
|
||||
* If you specify a block, then for each element in <i>enum</i>
|
||||
* the block is passed an accumulator value (<i>memo</i>) and the element.
|
||||
* If you specify a symbol instead, then each element in the collection
|
||||
|
|
Loading…
Add table
Reference in a new issue