diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-06 01:53:17 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-06 01:53:17 +0000 |
commit | 1ebe44b6cc9e59fc3116cffba007397e70a3f8cc (patch) | |
tree | 554f791be41cfc3450f501591cb677c40597be17 /enum.c | |
parent | 13f4c147ab03145f1a955a0444fed26f0609bc80 (diff) | |
download | ruby-1ebe44b6cc9e59fc3116cffba007397e70a3f8cc.tar.gz |
* 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
Diffstat (limited to 'enum.c')
-rw-r--r-- | enum.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |