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

ruby-changes:55799

From: Yusuke <ko1@a...>
Date: Thu, 23 May 2019 23:35:45 +0900 (JST)
Subject: [ruby-changes:55799] Yusuke Endoh: c04ef141d2 (trunk): enum.c (enum_tally): better example in rdoc

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

From c04ef141d2edd71f90f0707889b4adfd94e5be43 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Thu, 23 May 2019 23:34:18 +0900
Subject: enum.c (enum_tally): better example in rdoc


diff --git a/enum.c b/enum.c
index d7def94..609438b 100644
--- a/enum.c
+++ b/enum.c
@@ -1009,8 +1009,7 @@ tally_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash)) https://github.com/ruby/ruby/blob/trunk/enum.c#L1009
  *  elements and the values are numbers of elements in the collection
  *  that correspond to the key.
  *
- *     (1..6).tally   #=> {1=>1, 2=>1, 3=>1, 4=>1, 5=>1, 6=>1}
- *
+ *     ["a", "b", "c", "b"].tally #=> {"a"=>1, "b"=>2, "c"=>1}
  */
 
 static VALUE
-- 
cgit v0.10.2


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

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