summaryrefslogtreecommitdiffstats
path: root/ChangeLog
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-18 12:34:33 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-18 12:34:33 +0000
commitfdf77ef7392fb49a4aa8ae9f415b97716059337f (patch)
treedd3b69b5279a390e046ff8b2f7eed13c2614298e /ChangeLog
parent39ba24598513cb667bbe4fdaf552412408dd9195 (diff)
downloadruby-fdf77ef7392fb49a4aa8ae9f415b97716059337f.tar.gz
ruby-fdf77ef7392fb49a4aa8ae9f415b97716059337f.tar.xz
ruby-fdf77ef7392fb49a4aa8ae9f415b97716059337f.zip
* lib/csv.rb: writes lines with "\n" when row separator is not given.
formerly it was "\r\n". * lib/csv.rb: [CAUTION] API change * CSV::Row removed. a row is represented as just an Array. since CSV::Row was a subclass of Array, it won't hurt almost all programs except one which depended CSV::Row#match. * CSV::Cell removed. a cell is represented as just a String or nil(NULL). this change will cause widespread destruction. CSV.open("foo.csv", "r") do |row| row.each do |cell| if cell.is_null # Cell#is_null p "(NULL)" else p cell.data # Cell#data end end end must be just; CSV.open("foo.csv", "r") do |row| row.each do |cell| if cell.nil? p "(NULL)" else p cell end end end * lib/csv.rb: [CAUTION] record separator(CR, LF, CR+LF) behavior change. CSV.open, CSV.parse, and CSV,generate now do not force opened file binmode. formerly it set binmode explicitly. with CSV.open, binmode of opened file depends the given mode parameter "r", "w", "rb", and "wb". CSV.parse and CSV.generate open file with "r" and "w". setting mode properly is user's responsibility now. * lib/csv.rb: accepts String as a fs (field separator/column separator) and rs (record separator/row separator) * lib/csv.rb: added CSV.foreach(path, rs = nil, &block). CSV.foreach now does not handle "| cmd" as a path different from IO.foreach. needed? * test/csv/test_csv.rb: updated. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog55
1 files changed, 55 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 46eb6bedc..0dfe47dc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,58 @@
+Tue May 18 21:21:43 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
+
+ * lib/csv.rb: writes lines with "\n" when row separator is not given.
+ formerly it was "\r\n".
+
+ * lib/csv.rb: [CAUTION] API change
+
+ * CSV::Row removed. a row is represented as just an Array. since
+ CSV::Row was a subclass of Array, it won't hurt almost all programs
+ except one which depended CSV::Row#match.
+
+ * CSV::Cell removed. a cell is represented as just a String or
+ nil(NULL). this change will cause widespread destruction.
+
+ CSV.open("foo.csv", "r") do |row|
+ row.each do |cell|
+ if cell.is_null # Cell#is_null
+ p "(NULL)"
+ else
+ p cell.data # Cell#data
+ end
+ end
+ end
+
+ must be just;
+
+ CSV.open("foo.csv", "r") do |row|
+ row.each do |cell|
+ if cell.nil?
+ p "(NULL)"
+ else
+ p cell
+ end
+ end
+ end
+
+ * lib/csv.rb: [CAUTION] record separator(CR, LF, CR+LF) behavior
+ change. CSV.open, CSV.parse, and CSV,generate now do not force
+ opened file binmode. formerly it set binmode explicitly.
+
+ with CSV.open, binmode of opened file depends the given mode
+ parameter "r", "w", "rb", and "wb". CSV.parse and CSV.generate open
+ file with "r" and "w".
+
+ setting mode properly is user's responsibility now.
+
+ * lib/csv.rb: accepts String as a fs (field separator/column separator)
+ and rs (record separator/row separator)
+
+ * lib/csv.rb: added CSV.foreach(path, rs = nil, &block). CSV.foreach
+ now does not handle "| cmd" as a path different from IO.foreach.
+ needed?
+
+ * test/csv/test_csv.rb: updated.
+
Tue May 18 14:24:20 2004 why the lucky stiff <why@ruby-lang.org>
* lib/yaml.rb: added rdoc to beginning of lib.