Project

General

Profile

Actions

Feature #8683

closed

CSV library can't append to the current row. It should be able to.

Added by robertgleeson (Robert Gleeson) almost 11 years ago. Updated almost 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:56161]

Description

The CSV library can only add new rows, and it provides no way to update the current row after it has been created.

For example:
CSV.generate headers: true do |csv|
csv << ["one"]

["two", "three"].each do |e|
csv << e # This creates a new row, I want to append.
end
csv.headers << ["two", "three"] # No, this doesn't work either.
end

Is this possible? I find it hard to believe the API could be that limited and inflexible.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0