Genesis 38:8-9

38:8 Then Judah said to Onan, “Have sexual relations with your brother’s wife and fulfill the duty of a brother-in-law to her so that you may raise up a descendant for your brother.” 38:9 But Onan knew that the child would not be considered his. So whenever he had sexual relations with his brother’s wife, he withdrew prematurely so as not to give his brother a descendant.

Ruth 1:12-13

1:12 Go back home, my daughters! For I am too old to get married again. Even if I thought that there was hope that I could get married tonight and conceive sons, 1:13 surely you would not want to wait until they were old enough to marry! Surely you would not remain unmarried all that time! No, my daughters, you must not return with me. For my intense suffering is too much for you to bear. For the Lord is afflicting me!”

Ruth 3:9

3:9 He said, “Who are you?” She replied, “I am Ruth, your servant. Marry your servant, for you are a guardian of the family interests.”

Ruth 4:5

4:5 Then Boaz said, “When you acquire the field from Naomi, you must also acquire Ruth the Moabite, the wife of our deceased relative, in order to preserve his family name by raising up a descendant who will inherit his property.”