From 350a74005804b2e99302d1647bb9255cfc06ab62 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 14 Apr 2016 00:00:32 +0000 Subject: [PATCH] [DOC] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 7 ++++--- 1 file 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 ary 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#+.