public final RubyString catAscii(byte[]bytes, int ptr, int ptrLen) {
Encoding enc = value.getEncoding();
if (enc.isAsciiCompatible()) {
EncodingUtils.encCrStrBufCat(getRuntime(), this, new ByteList(bytes, ptr, ptrLen), enc, CR_7BIT, null);
} else {
byte buf[] = new byte[enc.maxLength()];
int end = ptr + ptrLen;
while (ptr < end) {
int c = bytes[ptr];
int len = codeLength(getRuntime(), enc, c);
EncodingUtils.encMbcput(c, buf, 0, enc);