Browse files

Document empty table :write_headers behavior

As James Gray pointed out in
, a table that only contains header rows must have :return_headers set
in order for :write_headers to write a header row.

This is now explicitly documented.
  • Loading branch information...
1 parent f2b8b32 commit edfc3e008ace20818412a8d6524a1ad59472b4c3 @daxelrod daxelrod committed Apr 2, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/faster_csv.rb
@@ -1402,6 +1402,10 @@ def self.table(path, options =
# through the converters).
# <b><tt>:write_headers</tt></b>:: When +true+ and <tt>:headers</tt> is
# set, a header row will be added to the
+ # output. Note that if the table only
+ # contains header rows,
+ # <tt>:return_headers</tt> must also be
+ # set in order for a header row to be
# output.
# <b><tt>:header_converters</tt></b>:: Identical in functionality to
# <tt>:converters</tt> save that the

0 comments on commit edfc3e0

Please sign in to comment.