summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-14 00:00:32 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-14 00:00:32 +0000
commit350a74005804b2e99302d1647bb9255cfc06ab62 (patch)
tree3f91d0373b7089189a9c87dd0ce4bdcee53e4be7
parent8574a372a03c418aa3dbfd9cd20acd252d3b3cbc (diff)
[DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--array.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/array.c b/array.c
index 85e3177b21..f52b967a9c 100644
--- a/array.c
+++ b/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#+.