提交 cdf72adf 编写于 作者: S soartec-lab

Corrected execution result of Enumerable#sum [ci skip]

上级 6746eea7
......@@ -2001,7 +2001,7 @@ Addition only assumes the elements respond to `+`:
```ruby
[[1, 2], [2, 3], [3, 4]].sum # => [1, 2, 2, 3, 3, 4]
%w(foo bar baz).sum # => "foobarbaz"
{a: 1, b: 2, c: 3}.sum # => [:b, 2, :c, 3, :a, 1]
{a: 1, b: 2, c: 3}.sum # => [:a, 1, :b, 2, :c, 3]
```
The sum of an empty collection is zero by default, but this is customizable:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册