  The main objects of the present paper are (i) Hibi rings (toric rings arising
from order polytopes of posets), (ii) stable set rings (toric rings arising
from stable set polytopes of perfect graphs), and (iii) edge rings (toric rings
arising from edge polytopes of graphs satisfying the odd cycle condition). The
goal of the present paper is to analyze those three toric rings and to discuss
their structures in the case where their class groups have small rank. We prove
that the class groups of (i), (ii) and (iii) are torsionfree. More precisely,
we give descriptions of their class groups. Moreover, we characterize the
posets or graphs whose associated toric rings have rank $1$ or $2$. By using
those characterizations, we discuss the differences of isomorphic classes of
those toric rings with small class groups.
