Hi Chrysoprasus,
Yes, I know that Onan's sin was coitus interruptus rather than masturbation. The Victorians used to interpret those verses as speaking against masturbation (hence "onanism") but I don't see it mentioned in the text.
The reason I posted it was because Onan was killed both for disobeying the Law (Deuteronomy 25:5) but also for using sex for a purpose it was not intended for. If he had just not wanted to have children by his brother's wife, then he could have refused - he wouldn't have then had sex with her anyway. It looks to me that Onan wanted to have sex with Tamar but not to have children by her, hence he used a contraceptive measure. I think sex was created for procreation (Genesis 1:28 ) and that this passage shows us that sex used for any other purpose alone is sinful. That is why I think masturbation is a sin, partly because it leads to lust, and partly because it is a way of having sex (with oneself) without intent to procreate. Hence I posted the verses about Onan.
Hope that clears things up.
/Lucilius