Bug #12373 » csv-shift-2.patch
lib/csv.rb | ||
---|---|---|
raise MalformedCSVError,
|
||
"Missing or stray quote in line #{lineno + 1}"
|
||
end
|
||
csv.last.gsub!(@quote_char * 2, @quote_char)
|
||
csv.last.gsub!(@double_quote_char, @quote_char)
|
||
in_extended_col = false
|
||
else
|
||
csv.last << part
|
||
... | ... | |
raise MalformedCSVError,
|
||
"Missing or stray quote in line #{lineno + 1}"
|
||
end
|
||
csv.last.gsub!(@quote_char * 2, @quote_char)
|
||
csv.last.gsub!(@double_quote_char, @quote_char)
|
||
elsif @liberal_parsing
|
||
csv << part
|
||
else
|
||
... | ... | |
@col_sep = options.delete(:col_sep).to_s.encode(@encoding)
|
||
@row_sep = options.delete(:row_sep) # encode after resolving :auto
|
||
@quote_char = options.delete(:quote_char).to_s.encode(@encoding)
|
||
@double_quote_char = @quote_char * 2
|
||
if @quote_char.length != 1
|
||
raise ArgumentError, ":quote_char has to be a single character String"
|