    /*
     *  call-seq:
     *     MultiTermQuery.default_max_terms = max_terms -> max_terms
     *
     *  Set the default value for +:max_terms+ in a MultiTermQuery. This value is
     *  also used by PrefixQuery, FuzzyQuery and WildcardQuery.
     */
    static VALUE
    frb_mtq_set_dmt(VALUE self, VALUE rnum_terms)
    {
        int max_terms = FIX2INT(rnum_terms);
        if (max_terms <= 0) {
            rb_raise(rb_eArgError,
                     "%d <= 0. @@max_terms must be > 0", max_terms);
        }
    #ifdef FRT_RUBY_VERSION_1_9
        rb_cvar_set(cMultiTermQuery, id_default_max_terms, rnum_terms);
    #else
        rb_cvar_set(cMultiTermQuery, id_default_max_terms, rnum_terms, Qfalse);
    #endif
        return rnum_terms;
    }