[DOC] Fix typo in String#scrub doc

This commit is contained in:
Nelli Simkova 2026-01-23 12:31:41 +03:00 committed by Nobuyoshi Nakada
parent 887913efc0
commit 3328246b91
Notes: git 2026-01-24 03:38:44 +00:00

View File

@ -5,7 +5,7 @@ With no block given, replaces each invalid sequence
with the given +default_replacement_string+ with the given +default_replacement_string+
(by default, <tt>"<22>"</tt> for a Unicode encoding, <tt>'?'</tt> otherwise): (by default, <tt>"<22>"</tt> for a Unicode encoding, <tt>'?'</tt> otherwise):
"foo\x81\x81bar"scrub # => "foo<6F><6F>bar" "foo\x81\x81bar".scrub # => "foo<6F><6F>bar"
"foo\x81\x81bar".force_encoding('US-ASCII').scrub # => "foo??bar" "foo\x81\x81bar".force_encoding('US-ASCII').scrub # => "foo??bar"
"foo\x81\x81bar".scrub('xyzzy') # => "fooxyzzyxyzzybar" "foo\x81\x81bar".scrub('xyzzy') # => "fooxyzzyxyzzybar"