From bcfabffa272b53174fa0e5b25a9964badc8790e6 Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Mon, 3 Nov 2014 01:54:19 -0500 Subject: [PATCH] Documentation of Array#each re: return value When given a block, Array#each returns self. https://bugs.ruby-lang.org/issues/10469 --- array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/array.c b/array.c index 04a8286..84f69a4 100644 --- a/array.c +++ b/array.c @@ -1782,9 +1782,9 @@ ary_enum_length(VALUE ary, VALUE args, VALUE eobj) * ary.each -> Enumerator * * Calls the given block once for each element in +self+, passing that element - * as a parameter. + * as a parameter. Returns the array itself. * - * An Enumerator is returned if no block is given. + * If no block is given, an Enumerator is returned. * * a = [ "a", "b", "c" ] * a.each {|x| print x, " -- " } -- 2.1.3