A handy method to construct a string out of multiple chunks.
Contrary to String#concat, it doesn't do any encoding negociation,
and simply append the content as bytes regardless of whether this
result in a broken string or not.
It's the caller responsibility to check for String#valid_encoding?
in cases where it's needed.
When passed integers, only the lower byte is considered, like in String#setbyte.
Related issues
Feature #20594: A new String method to append bytes while preserving encoding
Implement String#append_as_bytes(String | Integer, ...)
[Feature #20594]
A handy method to construct a string out of multiple chunks.
Contrary to
String#concat
, it doesn't do any encoding negociation,and simply append the content as bytes regardless of whether this
result in a broken string or not.
It's the caller responsibility to check for
String#valid_encoding?
in cases where it's needed.
When passed integers, only the lower byte is considered, like in
String#setbyte
.