From 364a0879c984aff94f2d0981e2d2aace61cbe715 Mon Sep 17 00:00:00 2001 From: hsbt Date: Thu, 6 Oct 2016 01:53:17 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ enum.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index c0ed20adf7..08d11c9400 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 6 10:37:13 2016 SHIBATA Hiroshi + + * enum.c: Add reduce/inject alias note. + [fix GH-1400][ci skip] Patch by @getaaron + Thu Oct 6 10:30:27 2016 Nobuyoshi Nakada * thread.c (update_coverage): check coverage values, and ignore diff --git a/enum.c b/enum.c index 625097c636..ff14cc87a0 100644 --- a/enum.c +++ b/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 inject and reduce methods are aliases. There + * is no performance benefit to either. + * * If you specify a block, then for each element in enum * the block is passed an accumulator value (memo) and the element. * If you specify a symbol instead, then each element in the collection