[en] The equation, describing the excitation of ideal small-scale MHD modes in plasma of finite pressure in toroidal magnetic traps with spatial magnetic axis and ripple magnetic field, is derived. On the basis of numerical analysis, the excitation zones of Mercier modes and ideal ballooning modes in a tokamak and their growth rates are obtained taking into account the ripple. It is shown that, in the cas of the 'reverse shear' regime of the confinement of plasma, the plasma stabilization is possible