}
private ByteList prepareByteList(ThreadContext context, IRubyObject value) {
RubyString str = value.convertToString();
RuntimeInfo info = RuntimeInfo.forRuntime(context.getRuntime());
if (info.encodingsSupported() && str.encoding(context) != info.utf8.get()) {
str = (RubyString)str.encode(context, info.utf8.get());
}
return str.getByteList().dup();
}