In article <1107042295.816570.61420 / z14g2000cwz.googlegroups.com>, mepython
wrote:
[...]
>How hard to do reverse: create csv string from list?
>
>Thanks. I just started Ruby couple of days ago, so I am learning
>instead of implementing, Sorry.

This assumes the input is an array of lines. (Where each line is an array.)

class Array
    def to_csv
        map { |line|
            line.map { |cell|
                '"' + cell.gsub(/"/, '""') + '"'
            }.join(',')
        }.join("\n")
    end
end

Note that literal quotes " are replaced with "".