From 22fe80f275f5e8a66d1e38daab1eb663eab79850 Mon Sep 17 00:00:00 2001 From: Carl Zulauf Date: Mon, 4 Aug 2025 08:52:03 -0600 Subject: [PATCH 1/3] Fix Typo in Regular Expressions docs (_regexp.rdoc) Small fix for a typo in the regular expression docs. The line of code above this change does not produce the output shown in the docs. With this change the docs will show the correct output for this example of using regex quantifiers. --- doc/_regexp.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/_regexp.rdoc b/doc/_regexp.rdoc index 45a307fad660d3..c9f3742241dd00 100644 --- a/doc/_regexp.rdoc +++ b/doc/_regexp.rdoc @@ -502,7 +502,7 @@ An added _quantifier_ specifies how many matches are required or allowed: /\w*/.match('x') # => # /\w*/.match('xyz') - # => # + # => # - + - Matches one or more times: From 4209ebb1e4c30f6cb70047238c858c99e773e964 Mon Sep 17 00:00:00 2001 From: Ethan Date: Tue, 5 Aug 2025 11:12:13 -0700 Subject: [PATCH 2/3] [DOC] Array#fill fix to indicate return is self doc currently indicates the return value as `new_array` but then in the first sentence explains "always returns +self+ (never a new array)". --- array.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/array.c b/array.c index f485223e34bd21..1afd52fb3dab91 100644 --- a/array.c +++ b/array.c @@ -4755,10 +4755,10 @@ rb_ary_clear(VALUE ary) /* * call-seq: - * fill(object, start = nil, count = nil) -> new_array - * fill(object, range) -> new_array - * fill(start = nil, count = nil) {|element| ... } -> new_array - * fill(range) {|element| ... } -> new_array + * fill(object, start = nil, count = nil) -> self + * fill(object, range) -> self + * fill(start = nil, count = nil) {|element| ... } -> self + * fill(range) {|element| ... } -> self * * Replaces selected elements in +self+; * may add elements to +self+; From 60ca525fce71b702ea8e5893c976044170a56d75 Mon Sep 17 00:00:00 2001 From: Ethan Date: Tue, 5 Aug 2025 11:42:05 -0700 Subject: [PATCH 3/3] [DOC] Array#map! fix to indicate return is self --- array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/array.c b/array.c index 1afd52fb3dab91..9f13b1bf5142b3 100644 --- a/array.c +++ b/array.c @@ -3659,9 +3659,9 @@ rb_ary_collect(VALUE ary) /* * call-seq: - * collect! {|element| ... } -> new_array + * collect! {|element| ... } -> self * collect! -> new_enumerator - * map! {|element| ... } -> new_array + * map! {|element| ... } -> self * map! -> new_enumerator * * With a block given, calls the block with each element of +self+