Your Ruby CSV Import Ran Successfully — Your Data May Still Be Wrong
Are you sure that Ruby CSV imported all your data — and correctly? 🤔 I wasn't looking for bugs. I was improving the performance of smarter_csv, then added a new round of tests — including some bor...

Source: DEV Community
Are you sure that Ruby CSV imported all your data — and correctly? 🤔 I wasn't looking for bugs. I was improving the performance of smarter_csv, then added a new round of tests — including some borrowed from Ruby CSV's own test suite as a sanity check. Then I started thinking through error scenarios. What I found was genuinely surprising — which also led me to realize that smarter_csv needed a reliable mechanism for bad row quarantine. I found 10 failure modes in Ruby CSV that produce no exception, no warning, and no indication that anything went wrong. Your import runs. Your tests pass. Your data is quietly wrong. The one that still gets me: CSV's numeric conversion silently converts the ZIP code "00123" into 83 🤯. Not a rounding error — a completely different number, because it interprets leading zeros as octal. ZIP codes, customer IDs, order numbers — all silently replaced with wrong integers that pass every validation, look plausible, and get stored in your database. Or this: a us