Skip to content

Instantly share code, notes, and snippets.

@felixrabe
Created May 8, 2012 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save felixrabe/2639448 to your computer and use it in GitHub Desktop.
Save felixrabe/2639448 to your computer and use it in GitHub Desktop.
CSV unparse
require 'csv'
# Please someone include this in the csv module proper. Thanks.
# Public domain. Author: Felix Rabe (heavily based on 1.9.3 stdlib csv docs)
class CSV
def CSV.unparse array
CSV.generate do |csv|
array.each { |i| csv << i }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment