See this test case for much more details.
Parsing the included CSV raises an encoding error, but parsing any slice of a handful of lines works fine. The test passes on MRI and in 1.8 mode.
@plexus the link you provided is broken.
Sorry for that, username change. This link should work https://gist.github.com/plexus/6a2b1c11d90cc321d334
Cool, thanks. I will take a look.
Add incomplete-character smarts to StringIO#gets + other tweaks.
* Add incomplete character logic to StringIO#gets.
* Move incomplete character logic to common place for
StringIO#gets and GZipReader#gets.
* Untag passing StringIO#gets test.
* Fixes #563.