rep = fallbackFunc.call(context, fallback, rep);
if (!rep.isNil()) {
rep = rep.convertToString();
Encoding repEnc = ((RubyString)rep).getEncoding();
ByteList repByteList = ((RubyString)rep).getByteList();
ec.insertOutput(repByteList.getUnsafeBytes(), repByteList.begin(), repByteList.getRealSize(), repEnc.getName());
// TODO: check for too-large replacement
continue;
}