Actions
Bug #8784
closedCSV - Empty fields are discarded when col_sep is a space
Description
When using space as column delimiter, empty fields are discarded.
With other delimiters, like comma, empty fields are correctly retrieved.
The following code reproduces the problem:
#!/usr/bin/env ruby
require 'csv'
print(CSV.parse('2009,2,3,8,0,,30.1,,'))
puts
print(CSV.parse('2009 2 3 8 0 30.1 ', col_sep: ' '))
puts
Expected output
[["2009", "2", "3", "8", "0", nil, "30.1", nil, nil]]
[["2009", "2", "3", "8", "0", nil, "30.1", nil, nil]]
Current output
[["2009", "2", "3", "8", "0", nil, "30.1", nil, nil]]
[["2009", "2", "3", "8", "0", "30.1", nil]]
Files
Actions
Like0
Like0Like0Like0Like0Like0