A man should always devote himself to the study of the law and to the
practice of good deeds, even if he does not do so for their own sake, as
self-satisfied performance may follow in due course. Thus, in recompense
for the forty-two sacrifices he offered, Balak was accounted worthy to
become the ancestor of Ruth. Rav Yossi bar Hunna has said, Ruth was the
daughter of Eglon, the grandson of Balak, king of Moab.
THE TALMUD, _Sanhedrin_, fol. 105, col. 2.