// marshalling logic.
if (value instanceof CoreObjectType) {
if (value instanceof DataType) {
throw value.getRuntime().newTypeError("no marshal_dump is defined for class " + value.getMetaClass().getName());
}
ClassIndex nativeClassIndex = ((CoreObjectType)value).getNativeClassIndex();
switch (nativeClassIndex) {
case ARRAY:
write('[');
RubyArray.marshalTo((RubyArray)value, this);