diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-15 10:07:42 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-15 10:07:42 +0000 |
commit | ffc136a024c26d1047421f900002bce32b8c9a2d (patch) | |
tree | eca95085900e6e1d735a8714597de8f048a0736e /lib/test | |
parent | bd96b4c8ccbfbaf68c6996d74515fd603b2aea63 (diff) | |
download | ruby-ffc136a024c26d1047421f900002bce32b8c9a2d.tar.gz |
* lib/csv.rb: add extra pamameter to specify row(record) separater character.
To parse Mac's CR separated CSV, do like this.
CSV.open("mac.csv", "r", ?,,?\r) { |row| p row.to_a }
The 3rd parameter in this example ?, is for column separater and the 4th ?\r
is for row separater. Row separater is nil by default. Nil separater means
"\r\n" or "\n".
* test/csv/test_csv.rb: add tests for above feature.
* test/csv/mac.csv: added. Sample CR separated CSV file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test')
0 files changed, 0 insertions, 0 deletions