// args: recv, path, level = nil, strategy = nil, opts = {}
IRubyObject obj = initializeCommon(args[0]);
if (args.length > 2) {
IRubyObject opt = TypeConverter.checkHashType(getRuntime(), args[args.length - 1]);
if (!opt.isNil()) {
EncodingOption enc = EncodingOption.getEncodingOptionFromObject(opt);
if (enc != null) {
readEncoding = enc.getExternalEncoding();
writeEncoding = enc.getInternalEncoding();
}
IRubyObject[] newArgs = new IRubyObject[args.length - 1];
System.arraycopy(args, 0, newArgs, 0, args.length - 1);
args = newArgs;
}