diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csv/parser.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/csv/parser.rb b/lib/csv/parser.rb index f87db3bb12..ef33a69478 100644 --- a/lib/csv/parser.rb +++ b/lib/csv/parser.rb @@ -768,7 +768,10 @@ class CSV string = nil if @samples.empty? and @input.is_a?(StringIO) string = @input.read - elsif @samples.size == 1 and @input.respond_to?(:eof?) and @input.eof? + elsif @samples.size == 1 and + @input != ARGF and + @input.respond_to?(:eof?) and + @input.eof? string = @samples[0] end if string |