mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8574a372a0
commit
350a740058
1 changed files with 4 additions and 3 deletions
7
array.c
7
array.c
|
@ -5659,9 +5659,10 @@ rb_ary_dig(int argc, VALUE *argv, VALUE self)
|
|||
*
|
||||
* If <i>ary</i> is empty, it returns 0.
|
||||
*
|
||||
* [].sum #=> 0
|
||||
* [1, 2, 3].sum #=> 6
|
||||
* [3, 5.5].sum #=> 8.5
|
||||
* [].sum #=> 0
|
||||
* [1, 2, 3].sum #=> 6
|
||||
* [3, 5.5].sum #=> 8.5
|
||||
* [Object.new].sum #=> TypeError
|
||||
*
|
||||
* This method may not respect method redefinition of "+" methods
|
||||
* such as Fixnum#+.
|
||||
|
|
Loading…
Reference in a new issue