    /*
     *  call-seq:
     *     fis[name] -> field_info
     *     fis[number] -> field_info
     *
     *  Get the FieldInfo object. FieldInfo objects can be referenced by either
     *  their field-number of the field-name (which must be a symbol). For
     *  example;
     *
     *    fi = fis[:name]
     *    fi = fis[2]
     */
    static VALUE
    frt_fis_get(VALUE self, VALUE ridx)
    {
        FieldInfos *fis = (FieldInfos *)DATA_PTR(self);
        VALUE rfi = Qnil;
        switch (TYPE(ridx)) {
            case T_FIXNUM: {
                int index = FIX2INT(ridx);
                if (index < 0) index += fis->size;
                if (index < 0 || index >= fis->size) {
                    rb_raise(rb_eArgError, "index of %d is out of range (0..%d)\n",
                             index, fis->size);
                }
                rfi = frt_get_field_info(fis->fields[index]);
                break;
                           }
            case T_SYMBOL:
                rfi = frt_get_field_info(fis_get_field(fis, frt_field(ridx)));
                break;
            case T_STRING:
                rfi = frt_get_field_info(fis_get_field(fis, StringValuePtr(ridx)));
                break;
            default:
                rb_raise(rb_eArgError, "Can't index FieldInfos with %s",
                         rs2s(rb_obj_as_string(ridx)));
                break;
        }
        return rfi;
    }