ChrisH wrote:
> Bil Kleb wrote:
> ...
>> She says that she can't figure out how to /append/
>> to a CSV file using Ruby's standard library.
> ...
> 
> Wouldn't it just be a matter of opening the file in append mode?

It would, but unfortunately CSV doesn't support 'a'
or 'a+', viz, lib/ruby/1.8/csv.rb,

      83   def CSV.open(path, mode, fs = nil, rs = nil, &block)
      84     if mode == 'r' or mode == 'rb'
      85       open_reader(path, mode, fs, rs, &block)
      86     elsif mode == 'w' or mode == 'wb'
      87       open_writer(path, mode, fs, rs, &block)
      88     else
      89       raise ArgumentError.new("'mode' must be 'r', 'rb', 'w', or 'wb'")
      90     end
      91   end

Later,
--
Bil
http://fun3d.larc.nasa.gov