    /*
     *  call-seq:
     *     sort.fields -> Array
     *
     *  Returns an array of the SortFields held by the Sort object.
     */
    static VALUE
    frb_sort_get_fields(VALUE self)
    {
        GET_SORT();
        VALUE rfields = rb_ary_new2(sort->size);
        int i;
        for (i = 0; i < sort->size; i++) {
            rb_ary_store(rfields, i, object_get(sort->sort_fields[i]));
        }
        return rfields;
    }