[DOC] Update String#encode
special case
This behavior has been slightly extended with the addition of `String#scrub`.
This commit is contained in:
parent
11f28f3268
commit
a2748c500d
@ -39,8 +39,9 @@ interprets +self+ using +src_encoding+, encodes the new string using +dst_encodi
|
|||||||
Optional keyword arguments +enc_opts+ specify encoding options;
|
Optional keyword arguments +enc_opts+ specify encoding options;
|
||||||
see {Encoding Options}[rdoc-ref:encodings.rdoc@Encoding+Options].
|
see {Encoding Options}[rdoc-ref:encodings.rdoc@Encoding+Options].
|
||||||
|
|
||||||
Please note that conversion from an encoding +enc+ to the same encoding
|
Please note that, unless <code>invalid: :replace</code> option is
|
||||||
+enc+ (independent of whether +enc+ is given explicitly or implicitly)
|
given, conversion from an encoding +enc+ to the same encoding +enc+
|
||||||
is a no-op, i.e. the string is simply copied without any changes, and
|
(independent of whether +enc+ is given explicitly or implicitly) is a
|
||||||
no exceptions are raised, even if there are invalid bytes.
|
no-op, i.e. the string is simply copied without any changes, and no
|
||||||
|
exceptions are raised, even if there are invalid bytes.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user