summaryrefslogtreecommitdiff
path: root/lib/csv.rb
AgeCommit message (Collapse)Author
2011-06-16 * lib/csv.rb: Document #raw_encoding. Patch by David Czarnecki.drbrain
[Ruby 1.9 - Bug #4874] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-02* lib/csv.rb: Improve the line ending detection algorithmjeg2
(patch by Alexey). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-26* lib/csv.rb: Enhance each() to support Enumerator.jeg2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-26* lib/csv.rb: Documentation improvements from Ysiad Ferreiras.jeg2
[Ruby 1.9 - Bug #4785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-25* lib/csv.rb: Improved stray quoting error message (patch by Edvard Majakari).jeg2
* lib/csv.rb: Remove debugging prints. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-11 * lib/csv.rb: fix a typo.nagachika
* lib/logger.rb: ditto * lib/rss.rb: ditto * lib/webrick/httpauth/authenticator.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-27* lib/csv.rb (CSV::open): suppress universal newline decorator.nobu
fixes #4603 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-27* lib/csv.rb (CSV.read): no mode is needed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26* strip trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25* lib/csv.rb (CSV.foreach): 'rb' mode is defaulted in open.nobu
* lib/csv.rb (CSV#init_separators): cannonicalize encoding options as Encoding objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25* lib/csv.rb (CSV#init_separators): use IO#gets with lengthnobu
parameter to get rid of wrong convertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25* lib/csv.rb (CSV::foreach, CSV#initialize): fixed passing options.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25* lib/csv.rb (CSV::foreach, CSV#initialize): directly use encodingnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25* lib/csv.rb, test/csv: should not assume $, invariant.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-17* lib/csv.rb: Upgrading output encoding with ASCII content jeg2
as needed. [ruby-core:33229] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-16* lib/csv.rb: Upgrading output encoding as needed. [ruby-core:33135]jeg2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-07* lib/csv.rb: Fixing documentation typos. [ruby-core:32712]jeg2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-11* lib/csv.rb: Fix unused variable warnings.marcandre
Patch by Run Paint [ruby-core:30991] * lib/date.rb: ditto * lib/debug.rb: ditto * lib/drb/drb.rb: ditto * lib/drb/invokemethod.rb: ditto * lib/irb/ruby-lex.rb: ditto * lib/irb/slex.rb: ditto * lib/logger.rb: ditto * lib/pathname.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01* lib/csv.rb: Improving documentation.jeg2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-25* lib/csv.rb: Fixing a bug that prevented CSV from parsingjeg2
all multi-line fields correctly. Patch by Rob Biedenham. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-23* lib/csv.rb: Incorporating the fixes from the recentjeg2
FasterCSV releases: 1.5.2 and 1.5.3. [ruby-core:25038] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20* lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31* A bug fix for deleting blank Table rows from Andy Hartford.jeg2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16* lib/csv.rb (CSV#raw_encoding): returns ASCII-8BIT when the ionaruse
doesn't have encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-15* lib/csv.rb (CSV#read_to_char): set encoding and verify datanaruse
which read from io before encode it to @encoding. * lib/csv.rb (CSV#raw_encoding): add to get @io's encoding. * lib/csv.rb (CSV#read_io): add to read string and set @io's encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16* lib/csv.rb: Change magic comment to US-ASCII in order tonaruse
make literals as US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* lib/**/*.rb: removed unnecessary shbang lines.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03* lib/csv.rb: Some minor documentation fixes from Gregory Brown.jeg2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03* lib/csv.rb: A patch from Madoka Yakamamoto to prevent an infinitejeg2
loop while reading some encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-26* lib/csv.rb: Using a more robust transcoding scheme to producejeg2
ASCII compatible inspect() messages. [ruby-dev:37591] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25* lib/csv.rb: Fixed a bug in read_to_char() that would slurpjeg2
whole files if the encoding was invalid. It will now read up to 10 bytes ahead to find a valid character boundary or give up. [ruby-core:19465] * test/csv/test_features.rb, test/csv/test_table.rb, test/csv/test_row.rb: Loosened some tests to check for a compatible? Encoding instea of an exact Encoding. [ruby-core:19470] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10* lib/csv/csv.rb: Added support for Encoding::default_internal.jeg2
* lib/csv/csv.rb: Switched to new Hash syntax. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-28* lib/csv/csv.rb: Worked around some minor encoding changes in Rubyjeg2
pointed out by Nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* lib/csv/csv.rb: Improved the idea of whitespace and word characters usedjeg2
in substitutions during header conversion as suggested by Michael Selig. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21* lib/csv/csv.rb: Reworked CSV's parser and generator to be m17n. Datajeg2
is now parsed in the Encoding it is in without need for translation. * lib/csv/csv.rb: Improved inspect() messages for better IRb support. * lib/csv/csv.rb: Fixed header writing bug reported by Dov Murik. * lib/csv/csv.rb: Use custom separators in parsing header Strings as suggested by Shmulik Regev. * lib/csv/csv.rb: Added a :write_headers option for outputting headers. * lib/csv/csv.rb: Handle open() calls in binary mode whenever we can to workaround a Windows issue where line-ending translation can cause an off-by-one error in seeking back to a non-zero starting position after auto-discovery for :row_sep as suggested by Robert Battle. * lib/csv/csv.rb: Improved the parser to fail faster when fed some forms of invalid CSV that can be detected without reading ahead. * lib/csv/csv.rb: Added a :field_size_limit option to control CSV's lookahead and prevent the parser from biting off more data than it can chew. * lib/csv/csv.rb: Added readers for CSV attributes: col_sep(), row_sep(), quote_char(), field_size_limit(), converters(), unconverted_fields?(), headers(), return_headers?(), write_headers?(), header_converters(), skip_blanks?(), and force_quotes?(). * lib/csv/csv.rb: Cleaned up code syntax to be more inline with Ruby 1.9 than 1.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04* lib/rdoc.rb: massive spelling correction patch from Evan Farrarmatz
<evanfarrar at gmail.com> in [ruby-doc:1382] applied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08* parse.y (arg): operator assignment "a += b rescue c" should bematz
parsed as "a += (b rescue c)" just like normal assignment. [ruby-talk:301000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-26* lib/csv.rb: Cleaned up some code with Ruby 1.9 idioms.jeg2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* lib/csv.rb: Fixed test failures caused by changes to Ruby.jeg2
* test/csv/tc_serialization, test/csv/tc_csv_parsing, test/csv/tc_features: Fixed test failures caused by changes to Ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* lib/csv.rb: Import the FasterCSV source as the new CSV class.jeg2
* test/csv/*: Added all applicable tests from FasterCSV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* lib/csv.rb, test/csv/test_csv.rb: Removed in preparation for FasterCSVjeg2
code import. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 * lib/csv.rb (CSV::IOReader#initialize): use String#[](pos, len)nahi
instead of String#[](idx) to check utf BOM. follows String#[](idx) behavior change of 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-26 * lib/csv.rb (CSV.read, CSV.readlines): added. works as IO.read andnahi
IO.readlines in CSV format. * lib/csv.rb (CSV.parse): [CAUTION] behavior changed. in the past, CSV.parse accepts a filename to be read-opened (it was just a shortcut of CSV.open(filename, 'r')). now CSV.parse accepts a string or a stream to be parsed e.g. CSV.parse("1,2\n3,r") #=> [['1', '2'], ['3', '4']] * test/csv/test_csv.rb: follow above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-20 * lib/csv.rb: fixed a few bugs around multi char record/field separator.nahi
* test/csv/test_csv.rb: added boundary test for above feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-18 * lib/csv.rb: writes lines with "\n" when row separator is not given.nahi
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@6359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-18* dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,nobu
lib/date.rb, lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb, lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb, lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb, lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/pop.rb, lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb, lib/rinda/tuplespace.rb, lib/shell/command-processor.rb, lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb, lib/test/unit/testsuite.rb: typo fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-29* exception message clean-up by Ian Macdonald <ian@caliban.org>.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-16 * lib/csv.rb: document reduction. [ruby-core:02429]nahi
* test/yaml/test_yaml.rb: added 0..1 test with "0".."1" on display. it should be defined that the specification about what kind of Range is supported in ruby's custom type in YAML. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-12 * lib/csv.rb: add Cell#to_str and Cell#to_s for /.../ =~ aCell,nahi
"#{aCell}" and so on. * test/csv/test_csv.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e