[DOC] Tweak for String#encode

This commit is contained in:
Burdette Lamar 2025-07-31 08:13:01 -05:00 committed by GitHub
parent 0d3d296b85
commit e2bd36388f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,6 @@
Returns a copy of +self+ transcoded as determined by +dst_encoding+.
Returns a copy of +self+ transcoded as determined by +dst_encoding+;
see {Encodings}[rdoc-ref:encodings.rdoc].
By default, raises an exception if +self+
contains an invalid byte or a character not defined in +dst_encoding+;
that behavior may be modified by encoding options; see below.
@ -45,3 +47,4 @@ given, conversion from an encoding +enc+ to the same encoding +enc+
no-op, i.e. the string is simply copied without any changes, and no
exceptions are raised, even if there are invalid bytes.
Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].