Originally Posted by DrLang
This is the passage I was referring to. It is often used outside of its full context, which I find to be dubious at best.
Indeed! The issue spoken of here is not masturbation, but disobedience to the Lord:
8 And Judah said to Onan, "Go in to your brother's wife and marry her, and raise up an heir to your brother." 9 But Onan knew that the heir would not be his; and it came to pass, when he went in to his brother's wife, that he emitted on the ground, lest he should give an heir to his brother. 10 And the thing which he did displeased the LORD; therefore He killed him also.
He was to marry his brother's former wife and to give her children, but he spilled his seed to avoid doing so, and thus disobeyed God.