From 65494d3cc6fbe5b25431021ac155b7aba3a1dff3 Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Tue, 8 Oct 2024 15:44:36 -0500 Subject: [PATCH] [DOC] Tweaks for Array#reject! --- array.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/array.c b/array.c index e30b7edb15..a08a8faf3a 100644 --- a/array.c +++ b/array.c @@ -4338,10 +4338,11 @@ ary_reject_bang(VALUE ary) /* * call-seq: - * array.reject! {|element| ... } -> self or nil - * array.reject! -> new_enumerator + * reject! {|element| ... } -> self or nil + * reject! -> new_enumerator * - * Removes each element for which the block returns a truthy value. + * With a block given, calls the block with each element of +self+; + * removes each element for which the block returns a truthy value. * * Returns +self+ if any elements removed: * @@ -4350,11 +4351,9 @@ ary_reject_bang(VALUE ary) * * Returns +nil+ if no elements removed. * - * Returns a new Enumerator if no block given: - * - * a = [:foo, 'bar', 2] - * a.reject! # => # + * With no block given, returns a new Enumerator. * + * Related: see {Methods for Deleting}[rdoc-ref:Array@Methods+for+Deleting]. */ static VALUE