summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-08-25 12:50:19 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-25 12:50:19 -0700
commite496e96547b64c3a2fa6f285c3bc9bd21a245ac6 (patch)
treede206dd2320c63a9a202bdd3d11d86e57a2bdb28 /enum.c
parent71d97a5ef80a23b0bb1005570ed059580981a467 (diff)
Document that Enumerable#sum may not respect redefinition of Range#each
It already documented that it may not respect redefinition of Integer#+. Fixes [Bug #13700]
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/enum.c b/enum.c
index ba47d34..bae32cb 100644
--- a/enum.c
+++ b/enum.c
@@ -4026,7 +4026,7 @@ int_range_sum(VALUE beg, VALUE end, int excl, VALUE init)
* "a\nb\nc".each_line.lazy.map(&:chomp).sum("") #=> "abc"
*
* Enumerable#sum method may not respect method redefinition of "+"
- * methods such as Integer#+.
+ * methods such as Integer#+, or "each" methods such as Range#each.
*/
static VALUE
enum_sum(int argc, VALUE* argv, VALUE obj)