From 5f3e9f185d354f17ba50510659fb3a766104e153 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Thu, 10 Oct 2024 12:20:37 -0400 Subject: [PATCH] [DOC] Mention that Enumerable#each_with_index calls self.each --- enum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/enum.c b/enum.c index 495b01dfa0..6aec34d850 100644 --- a/enum.c +++ b/enum.c @@ -2998,7 +2998,8 @@ each_with_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memo)) * each_with_index(*args) {|element, i| ..... } -> self * each_with_index(*args) -> enumerator * - * With a block given, calls the block with each element and its index; + * Invoke self.each with *args. + * With a block given, the block receives each element and its index; * returns +self+: * * h = {}