diff options
author | OKURA Masafumi <masafumi.o1988@gmail.com> | 2019-08-17 08:52:23 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-17 08:52:23 +0900 |
commit | efd37f8fc3e021c93f37d1f7f08fcb6b909d6ecf (patch) | |
tree | 2fec27f25b477333070be6ca01bc4f65cad1102c /enum.c | |
parent | 7624154595eb71333a61b37f4c7388b6c031e878 (diff) | |
download | bundler-efd37f8fc3e021c93f37d1f7f08fcb6b909d6ecf.tar.gz |
Remove redundant each from `sum` example (#2190) [ci skip]
It used to be `Enumerator#sum`, now it's range of string which calls
`Enumerable#sum` and causes TypeError.
Diffstat (limited to 'enum.c')
-rw-r--r-- | enum.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4017,7 +4017,7 @@ int_range_sum(VALUE beg, VALUE end, int excl, VALUE init) * { 1 => 10, 2 => 20 }.sum {|k, v| k * v } #=> 50 * (1..10).sum #=> 55 * (1..10).sum {|v| v * 2 } #=> 110 - * [Object.new].each.sum #=> TypeError + * ('a'..'z').sum #=> TypeError * * This method can be used for non-numeric objects by * explicit <i>init</i> argument. |