I think Ruined Library is definitely better than ruined market in most situations. If you have actions it's just as if it wasn't there. Ruined Market might be really useful in rare situations, but these are even more rare if your deck is clogged with ruins.
I'd also put poor house with the $2 cards. Comparing the 0* cards seems totally pointless to me, since you get them in different ways.
There are two ways to look at this.
(1) How does this card compare with not having it at all?
(2) If I have to have one of the two, which one would I rather have?
When you go by reasoning (1), then Ruined Market beats Ruined Library HANDS DOWN. Ruined Library NEVER helps your deck short of specific unusual combos. On the other hand, Ruined Market is usable in a variety of situations, mostly when it's the only source of +Buy, or the other sources of +Buy have strings attached to them (Baron, Trade Route).
When you go by reasoning (2), as you might when you've just been hit by a Cultist and have to take some sort of Ruins anyway, then, yes, Ruined Library is probably less damaging to your deck on balance.
I was very careful and deliberate in the wording of my original post. I categorized Ruined Market as "Usually detrimental to your deck but provides situationally desirable benefits," which is absolutely true. And I categorized Ruined Library as "Except in edge cases, benefits are limited to mitigating the damage they do to your deck." That is also absolutely true.