From: David Masover Date: 2009-09-15T09:57:22+09:00 Subject: Re: normalizing newlines On Sunday 13 September 2009 07:55:05 pm Alan Munn wrote: > I see. I think that for what its intended use will be, the split should > work fine (and certainly in testing hasn't failed yet.) If I begin > getting reports of failure on more complicated data I may need to > rethink things. I suppose so, but take a look at CSV in the standard library. It's really incredibly simple to use, and it's in the standard library, so it's not as if this is another dependency. Even if you want to spit the whole thing into RAM, you could do: require 'csv' rows = [] CSV.open('foo.csv'){|row| rows << row} Parsing a string you've got in RAM isn't any harder. Look at it another way, too -- if there is some weird failure case (as an example, try putting a double quote in the CSV and see what happens), you can work with the standard library people to get it fixed.