Using ideas from the cohomology of finite groups, an isomorphism is establi
shed between a group ring and the direct sum of twisted group rings. This g
ives a decomposition of a group ring code into twisted group ring codes. In
the abelian case the twisted group ring codes are (multi-dimensional) cons
tacyclic codes. We use the decomposition to prove that, with respect to the
Euclidean inner product, there are no self-dual group ring codes when the
group is the direct product of a 2-group and a group of odd order, and the
ring is a field of odd characteristic or a certain modular ring. In particu
lar, there are no self-dual abelian codes over the rings indicated. Extensi
ons of these results to non-Euclidean inner products are briefly discussed.