Skip to content

Commit

Permalink
Improved check for possibility of EOL auto-discover
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis committed May 30, 2011
1 parent 77a8940 commit cc572e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/faster_csv.rb
Expand Up @@ -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
Expand Down

0 comments on commit cc572e3

Please sign in to comment.