    /*
     *  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
    frb_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 - 1);
                }
                rfi = frb_get_field_info(fis->fields[index]);
                break;
                           }
            case T_SYMBOL:
            case T_STRING:
                rfi = frb_get_field_info(fis_get_field(fis, frb_field(ridx)));
                break;
                /*
            case T_STRING:
                rfi = frb_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;
    }