def array_to_binary(val)
      saved_object_count = @written_object_count
      @written_object_count += 1
      #@object_refs += val.value.size

      values = val.value.map { |v| v.to_binary(self) }
      bdata = Binary.type_bytes(0b1010, val.value.size) <<
        Binary.pack_int_array_with_size(object_ref_size(@object_refs),
                                        values)

      @object_table[saved_object_count] = bdata
      saved_object_count
    end
def array_to_binary(val)
      saved_object_count = @written_object_count
      @written_object_count += 1
      #@object_refs += val.value.size

      values = val.value.map { |v| v.to_binary(self) }
      bdata = Binary.type_bytes(0b1010, val.value.size) <<
        Binary.pack_int_array_with_size(object_ref_size(@object_refs),
                                        values)

      @object_table[saved_object_count] = bdata
      saved_object_count
    end
def array_to_binary ( val ) saved_object_count = @written_object_count @written_object_count += 1 #@object_refs += val.value.size values = val . value . map { | v | v . to_binary ( self ) } bdata = Binary . type_bytes ( 0b1010 , val . value . size ) << Binary . pack_int_array_with_size ( object_ref_size ( @object_refs ) , values ) @object_table [ saved_object_count ] = bdata saved_object_count end
Convert array to binary format and add it to the object table
Convert array to binary format and add it to the object table