From 036ca726bb9763690b7f6b7fe05ddf112d22ddc5 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 4 Sep 2024 11:24:00 +0200 Subject: [PATCH] Fix documentation for String#index and String#byterindex --- string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/string.c b/string.c index 3fefe7bef0..d9569d1515 100644 --- a/string.c +++ b/string.c @@ -4480,7 +4480,7 @@ rb_str_rindex(VALUE str, VALUE sub, long pos) * $~ #=> # * * Integer argument +offset+, if given and non-negative, specifies the maximum starting position in the - * string to _end_ the search: + * string to _end_ the search: * * 'foo'.rindex('o', 0) # => nil * 'foo'.rindex('o', 1) # => 1 @@ -4613,7 +4613,7 @@ rb_str_byterindex(VALUE str, VALUE sub, long pos) * $~ #=> # * * Integer argument +offset+, if given and non-negative, specifies the maximum starting byte-based position in the - * string to _end_ the search: + * string to _end_ the search: * * 'foo'.byterindex('o', 0) # => nil * 'foo'.byterindex('o', 1) # => 1