lib/io_streams/delimited/reader.rb in iostreams-0.8.0 vs lib/io_streams/delimited/reader.rb in iostreams-0.8.1

- old
+ new

@@ -106,10 +106,10 @@ chunk.size end # Auto detect text line delimiter def detect_delimiter - if @buffer =~ /\r\n|\n\r|\n/ + if @buffer =~ /\r\n|\n\r|\n|\r/ $& elsif @buffer.size <= @buffer_size # Handle one line files that are smaller than the buffer size "\n" end