Permalink
Browse files

Improved check for possibility of EOL auto-discover

  • Loading branch information...
1 parent 77a8940 commit cc572e377c9db289aab411503c5ea1c190499a81 @alexis alexis committed May 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/faster_csv.rb
View
@@ -1743,7 +1743,7 @@ def init_separators(options)
# automatically discover row separator when requested
if @row_sep == :auto
- if !@io.respond_to?(:eof?) or (@io.eof? rescue true) # we can't auto-discover for STDOUT, STDERR, Zlib::GzipWriter streems, etc
+ if !@io.respond_to?(:pos) or !@io.respond_to?(:eof?) or (@io.eof? rescue true) # we can't auto-discover for STDOUT, STDERR, Zlib::GzipWriter streems, etc
@row_sep = $INPUT_RECORD_SEPARATOR
else
begin

0 comments on commit cc572e3

Please sign in to comment.