From 3328246b91cbf1d69a2ba48dd5b5010490542084 Mon Sep 17 00:00:00 2001 From: Nelli Simkova Date: Fri, 23 Jan 2026 12:31:41 +0300 Subject: [PATCH 1/2] [DOC] Fix typo in String#scrub doc --- doc/string/scrub.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/string/scrub.rdoc b/doc/string/scrub.rdoc index 5ace376cdbec85..314b28c465c580 100644 --- a/doc/string/scrub.rdoc +++ b/doc/string/scrub.rdoc @@ -5,7 +5,7 @@ With no block given, replaces each invalid sequence with the given +default_replacement_string+ (by default, "�" for a Unicode encoding, '?' otherwise): - "foo\x81\x81bar"scrub # => "foo��bar" + "foo\x81\x81bar".scrub # => "foo��bar" "foo\x81\x81bar".force_encoding('US-ASCII').scrub # => "foo??bar" "foo\x81\x81bar".scrub('xyzzy') # => "fooxyzzyxyzzybar" From 3dd928c284b9365d9b4edc5ab5e47800633b6c38 Mon Sep 17 00:00:00 2001 From: Bodhi Russell Silberling Date: Fri, 23 Jan 2026 19:41:36 -0800 Subject: [PATCH 2/2] [DOC] Fix typo: occurences -> occurrences --- internal/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/string.h b/internal/string.h index 9212ce898653be..02e708d34180ff 100644 --- a/internal/string.h +++ b/internal/string.h @@ -38,7 +38,7 @@ rb_str_encindex_fastpath(int encindex) // Hence you can use fast, single byte algorithms on them, such as `memchr` etc, // without all the overhead of fetching the rb_encoding and using functions such as // rb_enc_mbminlen etc. - // Many other encodings could qualify, but they are expected to be rare occurences, + // Many other encodings could qualify, but they are expected to be rare occurrences, // so it's better to keep that list small. switch (encindex) { case ENCINDEX_ASCII_8BIT: