RubyArray arr = (RubyArray)obj;
IRubyObject entry0, entry1, entry2;
entry0 = arr.size() > 0 ? arr.eltOk(0) : context.nil;
entry1 = arr.size() > 1 ? arr.eltOk(1) : context.nil;
entry2 = arr.size() > 2 ? arr.eltOk(2) : context.nil;
if (entry2.isNil()) entry2 = template.callMethod(context, "[]", entry0);
if (entry2.isNil()) entry2 = runtime.getClassFromPath("OpenSSL::X509::Name").getConstant("DEFAULT_OBJECT_TYPE");
add_entry(context, entry0, entry1, entry2);