aboutsummaryrefslogtreecommitdiffstats
path: root/lib/csv.rb
Commit message (Collapse)AuthorAgeFilesLines
* Update documentation of CSV header converternobu2016-01-231-3/+4
| | | | | | | * lib/csv.rb: Update documentation of CSV header converter for r45498, [GH-575]. [Fix GH-1215] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Adding a liberal_parsing option to CSV. Patch by Braden Anderson.jeg22016-01-011-4/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* csv.rb: Fix typo [ci skipnobu2015-12-191-1/+1
| | | | | | | * lib/csv.rb (CSV#initialize): [DOC] Fix double-word typo. [Fix GH-1161] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* csv.rb: tail commasnobu2015-12-181-36/+40
| | | | | | | * lib/csv.rb (CSV::Converters, CSV::DEFAULT_OPTIONS): supply tail commas for further elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* csv.rb: fix typonobu2015-12-181-1/+1
| | | | | | * lib/csv.rb (CSV#shift): fix typo. [See GH-1160] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* csv.rb: fix encodingnobu2015-12-021-1/+1
| | | | | | | * lib/csv.rb: encoding must be plased at the first line except for shebang. [fix GH-1116] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: enable frozen_string_literal.hsbt2015-12-021-4/+5
| | | | | | [fix GH-1116] Patch by @marshall-lee git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: typo fix [ci skip][fix GH-958] Patch by @henrikhsbt2015-07-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: accept to use Range object for row selection.hsbt2015-06-171-3/+7
| | | | | | [Feature #11267][ruby-dev:49091] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Fix typo. Patch by @davydovantongogotanaka2015-06-101-1/+1
| | | | | | [Fix GH-928][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/csv.rb: [DOC] Fix typo [ci skip][Fix GH-907]gogotanaka2015-06-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2014-11-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: added documentation for skip_blanks option by @decasiahsbt2014-11-041-1/+9
| | | | | | [fix GH-744][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: avoid unnecessary object allocations.glass2014-09-211-2/+2
| | | | | | patch is from Andrew Vit. [ruby-core:63215] [Feature #9952] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* csv.rb: honor encoding optionnobu2014-06-101-7/+10
| | | | | | | | * lib/csv.rb (CSV#<<): honor explicity given encoding. based on the patch by DAISUKE TANIWAKI <daisuketaniwaki AT gmail.com> at [ruby-core:62113]. [Bug #9766] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV.open): Close the opened file when an exception occur.akr2014-05-291-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Reject nil as data source for CSV.new, patch by @Peeja.zzak2014-05-251-0/+4
| | | | | | | [Fixes GH-580] https://github.com/ruby/ruby/pull/580 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: fix minor typo by @baroquebobcat [fix GH-583][ci skip]hsbt2014-04-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Symbol HeaderConverter: strip leading/trailing space.jeg22014-04-011-2/+2
| | | | | | | | | Reported by Skye Shaw [Fixes GH-575] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Don't attempt to convert nil headers.jeg22014-04-011-0/+1
| | | | | | | | Reported by Skye Shaw git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Fixed a broken regular expression that was causingjeg22014-03-201-2/+1
| | | | | | | | | | | CSV to miss escaping some special meaning characters when used in parsing. Reported by David Unric [ruby-core:54986] [Bug #8405] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: [DOC] Fix typosa_matsuda2013-12-021-7/+7
| | | | | | | | s/occurrs/occurs/, s/interation/iteration/, s/intetionally/intentionally/, s/modfied/modified/, s/axception/exception/, s/curcuit/circuit/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Optimize header hashes by freezing string keys.jeg22013-11-241-0/+2
| | | | | | | | [ruby-core:58510] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: If skip_lines is set to a String, convert it to a Regexpjeg22013-11-231-5/+8
| | | | | | | | | to prevent the alternative, which is that each line in the CSV gets converted to a Regexp when calling skip_lines#match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: [DOC] Fix typo in CSV.parse_line by @funky-bibimbapzzak2013-11-071-2/+2
| | | | | | | [Fixes GH-430] https://github.com/ruby/ruby/pull/430 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* csv.rb: foreach enumeratornobu2013-10-041-0/+1
| | | | | | | | * lib/csv.rb (CSV.foreach): support enumerator. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:57643]. [ruby-core:57283] [Feature #8929] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* csv.rb: get rid of discarding coderangenobu2013-07-011-1/+1
| | | | | | | | | * lib/csv.rb (CSV#<<): use StringIO#set_encoding instead of creating new StringIO instance with String#force_encoding, forcing encoding discards the cached coderange bits and can make further operations very slow. [ruby-core:55714] [Bug #8585] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Remove the dangerous serialization feature.jeg22013-02-051-127/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Added more Hash methods to CSV::Row.jeg22012-12-271-1/+37
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: A fix for row comparison by Stephen Wattam. [Bug #7528]jeg22012-12-071-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (init_comments): Document private method #init_comments.zzak2012-11-141-0/+5
| | | | | | | Based on a patch from Vincent Batts [ruby-core:49172] [Bug #7319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove garbages.nobu2012-09-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (Object#CSV, Array#to_csv, String#parse_csv): zzak2012-09-191-5/+26
| | | | | | | | Examples and documentation for CSV. [Bug #6880] [ruby-core:47218] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove trainling spaces.nobu2012-08-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Fixes #161 on githubjeg22012-08-201-1/+24
| | | | | | | | | | * lib/csv.rb: You can now specify a pattern for :skip_lines. Matching lines will not be passed to the CSV parser. * lib/csv.rb: Patch by Christian Schwartz. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Do not modify CSV.generate's argument [ruby-core:38356]marcandre2011-07-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Document #raw_encoding. Patch by David Czarnecki.drbrain2011-06-161-0/+4
| | | | | | | [Ruby 1.9 - Bug #4874] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Improve the line ending detection algorithmjeg22011-06-021-10/+24
| | | | | | | | (patch by Alexey). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Enhance each() to support Enumerator.jeg22011-05-261-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Documentation improvements from Ysiad Ferreiras.jeg22011-05-261-4/+5
| | | | | | | | [Ruby 1.9 - Bug #4785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Improved stray quoting error message (patch by Edvard Majakari).jeg22011-05-251-14/+21
| | | | | | | * lib/csv.rb: Remove debugging prints. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: fix a typo.nagachika2011-05-111-1/+1
| | | | | | | | * 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
* * lib/csv.rb (CSV::open): suppress universal newline decorator.nobu2011-04-271-4/+12
| | | | | | fixes #4603 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV.read): no mode is needed.nobu2011-04-271-5/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strip trailing spaces.nobu2011-04-261-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV.foreach): 'rb' mode is defaulted in open.nobu2010-12-251-7/+12
| | | | | | | * 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
* * lib/csv.rb (CSV#init_separators): use IO#gets with lengthnobu2010-12-251-38/+4
| | | | | | parameter to get rid of wrong convertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV::foreach, CSV#initialize): fixed passing options.nobu2010-12-251-3/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV::foreach, CSV#initialize): directly use encodingnobu2010-12-251-5/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb, test/csv: should not assume $, invariant.nobu2010-12-251-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e