Project

General

Profile

Feature #9952 ยป csv-20140618.patch

Optimization for CSV Row - avit (Andrew Vit), 06/18/2014 08:46 AM

View differences:

lib/csv.rb
headers.each { |h| h.freeze if h.is_a? String }
# handle extra headers or fields
@row = if headers.size > fields.size
@row = if headers.size >= fields.size
headers.zip(fields)
else
fields.zip(headers).map { |pair| pair.reverse }
fields.zip(headers).map { |pair| pair.reverse! }
end
end
    (1-1/1)