Genesis 38:10

10 What he did was evil in the LORD's eyes. So the LORD put him to death also.