[前][次][番号順一覧][スレッド一覧]

ruby-changes:65686

From: Nobuyoshi <ko1@a...>
Date: Mon, 29 Mar 2021 11:56:20 +0900 (JST)
Subject: [ruby-changes:65686] f46bbb2e99 (master): [DOC] Improve an example of Array#count comparison [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=f46bbb2e99

From f46bbb2e99b8c1df6a62756967b40de36039916b Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 29 Mar 2021 11:35:38 +0900
Subject: [DOC] Improve an example of Array#count comparison [ci skip]

---
 array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/array.c b/array.c
index 7c84bba..be744e2 100644
--- a/array.c
+++ b/array.c
@@ -6094,7 +6094,7 @@ rb_ary_compact(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L6094
  *    [].count # => 0
  *
  *  With argument +obj+, returns the count of elements <tt>==</tt> to +obj+:
- *    [0, 1, 2, 0].count(0) # => 2
+ *    [0, 1, 2, 0.0].count(0) # => 2
  *    [0, 1, 2].count(3) # => 0
  *
  *  With no argument and a block given, calls the block with each element;
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]