News
3.3.5 - 2025-06-01
Improvements
* docs: Fixed {StringScanner} document URL.
* GH-343
* Patch by Petrik de Heus
Thanks
* Petrik de Heus
3.3.4 - 2025-04-13
Improvements
* `csv-filter`: Removed an experimental command line tool.
* GH-341
3.3.3 - 2025-03-20
Improvements
* `csv-filter`: Added an experimental command line tool to filter a CSV.
* Patch by Burdette Lamar
Fixes
* Fixed wrong EOF detection for {ARGF}
* GH-328
* Reported by Takeshi Nishimatsu
* Fixed a regression bug that {CSV.open} rejects integer mode.
* GH-336
* Reported by Dave Burgess
Thanks
* Takeshi Nishimatsu
* Burdette Lamar
* Dave Burgess
3.3.2 - 2024-12-21
Fixes
* Fixed a parse bug with a quoted line with `col_sep` and an empty
line. This was introduced in 3.3.
* GH-324
* Reported by stoodfarback
Thanks
* stoodfarback
3.3.1 - 2024-12-15
Improvements
* {CSV.open}: Changed to detect BOM by default. Note that this isn't
enabled on Windows because Ruby may have a bug. See also:
https://bugs.ruby-lang.org/issues/20526
* GH-301
* Reported by Junichi Ito
* Improved performance.
* GH-311
* GH-312
* Patch by Vladimir Kochnev
* {CSV.open}: Added support for {StringIO} as an input.
* GH-300
* GH-302
* Patch by Marcelo
* Added a built-in time converter. You can use it by `converters:
:time`.
* GH-313
* Patch by Bart de Water
* Added {CSV::TSV} for tab-separated values.
* GH-272
* GH-319
* Reported by kojix2
* Patch by Jas
Thanks
* Junichi Ito
* Vladimir Kochnev
* Marcelo
* Bart de Water
* kojix2
* Jas
3.3.0 - 2024-03-22
Fixes
* Fixed a regression parse bug in 3.2 that parsing with
`:skip_lines` may cause wrong result.
3.2.9 - 2024-03-22
Fixes
* Fixed a parse bug that wrong result may be happen when:
* `:skip_lines` is used
* `:row_separator` is `"\r\n"`
* There is a line that includes `\n` as a column value
Reported by Ryo Tsukamoto.
GH-296
Thanks
* Ryo Tsukamoto
3.2.8 - 2023-11-08
Improvements
* Added {CSV::InvalidEncodingError}.
Patch by Kosuke Shibata.
GH-287
Thanks
* Kosuke Shibata
3.2.7 - 2023-06-26
Improvements
* Removed an unused internal variable.
[GH-273](https://github.com/ruby/csv/issues/273)
[Patch by Mau Magnaguagno]
* Changed to use `https://` instead of `http://` in documents.
[GH-274](https://github.com/ruby/csv/issues/274)
[Patch by Vivek Bharath Akupatni]
* Added prefix to a helper module in test.
[GH-278](https://github.com/ruby/csv/issues/278)
[Patch by Luke Gruber]
* Added a documentation for `liberal_parsing: {backslash_quotes: true}`.
[GH-280](https://github.com/ruby/csv/issues/280)
[Patch by Mark Schneider]
Fixes
* Fixed a wrong execution result in documents.
[GH-276](https://github.com/ruby/csv/issues/276)
[Patch by Yuki Tsujimoto]
* Fixed a bug that the same line is used multiple times.
[GH-279](https://github.com/ruby/csv/issues/279)
[Reported by Gabriel Nagy]
Thanks
* Mau Magnaguagno
* Vivek Bharath Akupatni
* Yuki Tsujimoto
* Luke Gruber
* Mark Schneider
* Gabriel Nagy
3.2.6 - 2022-12-08
Improvements
* {CSV{CSV[[GitHub[Reported by Lhoussaine Ghallou]
* All {Enumerable} based methods consume the same lines with other
methods. This may have a performance penalty.
[[GitHub[Reported by Lhoussaine Ghallou]
* Simplify some implementations.
[[GitHub[[GitHub[Patch by Mau Magnaguagno]
Fixes
* Fixed {CSV.generate_lines} document.
[[GitHub[Patch by Sampat Badhe]
Thanks
* Sampat Badhe
* Lhoussaine Ghallou
* Mau Magnaguagno
3.2.5 - 2022-08-26
Improvements
* Added {CSV.generate_lines}.
[[GitHub[Reported by OKURA Masafumi]
[[GitHub[Patch by Eriko Sugiyama]
Thanks
* OKURA Masafumi
* Eriko Sugiyama
3.2.4 - 2022-08-22
Improvements
* Cleaned up internal implementations.
[[GitHub[[GitHub[[GitHub[Patch by Mau Magnaguagno]
* Added support for RFC 3339 style time.
[[GitHub[Patch by Thierry Lambert]
* Added support for transcoding String CSV. Syntax is
`from-encoding:to-encoding`.
[[GitHub[Reported by Richard Stueven]
* Added quoted information to {CSV::FieldInfo}.
[[GitHub[Reported by Hirokazu SUZUKI]
Fixes
* Fixed a link in documents.
[[GitHub[Patch by Peter Zhu]
Thanks
* Peter Zhu
* Mau Magnaguagno
* Thierry Lambert
* Richard Stueven
* Hirokazu SUZUKI
3.2.3 - 2022-04-09
Improvements
* Added contents summary to {CSV::Table[GitHub[GitHub
* Suppressed `$INPUT_RECORD_SEPARATOR` deprecation warning by
{Warning.warn}.
[GitHub
* Improved error message for liberal parsing with quoted values.
[GitHub
* Fixed typos in documentation.
[GitHub
* Added `:max_field_size` option and deprecated `:field_size_limit` option.
[GitHub
* Added `:symbol_raw` to built-in converters.
[GitHub[GitHub
Fixes
* Fixed a bug that some texts may be dropped unexpectedly.
[Bug
* Fixed a bug that `:field_size_limit` doesn't work with not complex row.
[GitHub#238][Reported by Dan Buettner]
Thanks
* Hassan Abdul Rehman
* Eriko Sugiyama
* Jean byroot Boussier
* Nikolay Rys
* Sampat Badhe
* Dan Buettner
* taki
3.2.2 - 2021-12-24
Improvements
* Added a validation for invalid option combination.
[GitHub
* Improved documentation for developers.
[GitHub
Fixes
* Fixed a bug that all of {ARGF} contents may not be consumed.
[GitHub
Thanks
* adamroyjones
* Eriko Sugiyama
* Rafael Navaza
3.2.1 - 2021-10-23
Improvements
* doc: Fixed wrong class name.
[GitHub
* Changed to always use `"\n"` for the default row separator on Ruby
3.0 or later because `$INPUT_RECORD_SEPARATOR` was deprecated
since Ruby 3.0.
* Added support for Ractor.
[GitHub
* Users who want to use the built-in converters in non-main
Ractors need to call {Ractor.make_shareable(CSV::Converters)}
and/or {Ractor.make_shareable(CSV::HeaderConverters)} before
creating non-main Ractors.
Thanks
* Vince
* Joakim Antman
* rm155
3.2.0 - 2021-06-06
Improvements
* {CSV.open}: Added support for `:newline` option.
[GitHub
* {CSV::Table.
[GitHub
* {Object
* {CSV::Row}: Added support for pattern matching.
[GitHub
Fixes
* Fixed typos in documentation.
[GitHub
Thanks
* Sampat Badhe
* Nobuyoshi Nakada
* Yaroslav Berezovskiy
* Kevin Newton
3.1.9 - 2020-11-23
Fixes
* Fixed a compatibility bug that the line to be processed by
`skip_lines:` has a row separator.
[GitHub
Thanks
* Josef Šimánek
3.1.8 - 2020-11-18
Improvements
* Improved documentation.
[Patch by Burdette Lamar]
Thanks
* Burdette Lamar
3.1.7 - 2020-08-04
Improvements
* Improved document.
[GitHub[Patch by Burdette Lamar]
* Updated required Ruby version to 2.5 or later.
[GitHub[Patch by Gabriel Nagy]
* Removed stringio 0.1 or later dependency.
Thanks
* Burdette Lamar
* Gabriel Nagy
3.1.6 - 2020-07-20
Improvements
* Improved document.
[GitHub[GitHub[GitHub[Patch by Burdette Lamar]
* {CSV.open}: Added support for `undef: :replace`.
[GitHub
* {CSV.open}: Added support for `invalid: :replace`.
[GitHub
* Don't run quotable check for invalid encoding field values.
[GitHub#131][Patch by Koichi ITO]
* Added support for specifying the target indexes and names to
`force_quotes:`.
[GitHub#153][Reported by Aleksandr]
* {CSV.generate}: Changed to use the encoding of the first non-ASCII
field rather than the encoding of ASCII only field.
* Changed to require the stringio gem 0.1.3 or later.
Thanks
* Burdette Lamar
* Koichi ITO
* Aleksandr
3.1.5 - 2020-05-18
Improvements
* Improved document.
[GitHub
Fixes
* Added missing document files.
[GitHub
Thanks
* Burdette Lamar
* joast
3.1.4 - 2020-05-17
Improvements
* Improved document.
[GitHub
* Stopped to dropping stack trace for exception caused by
{CSV.parse_line}.
[GitHub
Fixes
* Fixed a bug that `:write_nil_value` or `:write_empty_value` don't
work with non {String} objects.
[GitHub#123][Reported by asm256]
Thanks
* Burdette Lamar
* asm256
* Kyle d'Oliveira
3.1.3 - 2020-05-09
Improvements
* {CSV::Row[GitHub
Fixes
* Fixed a infinite loop bug for zero length match `skip_lines`.
[GitHub
* {CSV.generate}: Fixed a bug that encoding isn't set correctly.
[GitHub#110][Patch by Seiei Miyagi]
* Fixed document for the `:strip` option.
[GitHub#114][Patch by TOMITA Masahiro]
* Fixed a parse bug when split charcter exists in middle of column
value.
[GitHub#115][Reported by TOMITA Masahiro]
Thanks
* Jim Kane
* Mike MacDonald
* Seiei Miyagi
* TOMITA Masahiro
3.1.2 - 2019-10-12
Improvements
* Added `:col_sep` check.
[GitHub
* Suppressed warnings.
[GitHub
* Improved documentation.
[GitHub
Fixes
* Fixed a typo in documentation.
[GitHub
* Fixed a multibyte character handling bug.
[GitHub
* Fixed typos in documentation.
[GitHub
* Fixed a bug that seeked {StringIO} isn't accepted.
[GitHub#98][Patch by MATSUMOTO Katsuyoshi]
* Fixed a bug that {CSV.generate_line} doesn't work with
{Encoding.default_internal}.
[GitHub
Thanks
* Florent Beaurain
* Yuji Yaginuma
* Nobuyoshi Nakada
* koshigoe
* Vitor Oliveira
* MATSUMOTO Katsuyoshi
* David Rodríguez
3.1.1 - 2019-04-26
Improvements
* Added documentation for `strip` option.
[GitHub
* Added documentation for `write_converters`, `write_nil_value` and
`write_empty_value` options.
[GitHub
* Added documentation for `quote_empty` option.
[GitHub
Fixes
* Fixed a bug that `strip; true` removes a newline.
Thanks
* hayashiyoshino
* Masafumi Koba
* kawa\_tech
3.1.0 - 2019-04-17
Fixes
* Fixed a backward incompatibility bug that {CSVerror.
[GitHub
Thanks
* krororo
3.0.9 - 2019-04-15
Fixes
* Fixed a test for Windows.
3.0.8 - 2019-04-11
Fixes
* Fixed a bug that `strip: String` doesn't work.
3.0.7 - 2019-04-08
Improvements
* Improve parse performance 1.5x by introducing loose parser.
Fixes
* Fix performance regression in 3.0.
* Fix a bug that {CSVuse `quote_char: nil`.
3.0.6 - 2019-03-30
Improvements
* {CSV.foreach}: Added support for `mode`.
3.0.5 - 2019-03-24
Improvements
* Added `:liberal_parsing => {backslash_quote: true}` option.
[GitHub
* Added `:write_converters` option.
[GitHub
* Added `:write_nil_value` option.
* Added `:write_empty_value` option.
* Improved invalid byte line number detection.
[GitHub
* Added `quote_char: nil` optimization.
[GitHub
* Improved error message.
[GitHub
* Improved IO-like implementation for {StringIO} data.
[GitHub
* Added `:strip` option.
[GitHub
Fixes
* Fixed a compatibility bug that {CSV[GitHub
* Fixed a compatibility bug that {CSVand {CSV[GitHub
* Fixed a compatibility bug that invalid line isn't ignored.
[GitHub#82][Reported by krororo]
* Fixed a bug that `:skip_lines` doesn't work with multibyte characters data.
[GitHub
Thanks
* Alyssa Ross
* 284km
* Chi Leung
* Danillo Souza
* Andrés Torres
* Genadi Samokovarov
* krororo
* ff2248
3.0.4 - 2019-01-25
Improvements
* Removed duplicated {CSV::Row[GitHub
* Removed duplicated {CSV::Row[GitHub
Fixes
* Fixed a typo in document.
[GitHub
* Fixed a compatibility bug when row are changed.
[GitHub
Thanks
* Max Schwenk
* Artur Beljajev
* tomoyuki kosaka
3.0.3 - 2019-01-12
Improvements
* Migrated benchmark tool to benchmark-driver from benchmark-ips.
[GitHub
* Added `liberal_parsing: {double_quote_outside_quote: true}` parse
option.
[GitHub
* Added `quote_empty:` write option.
[GitHub
Fixes
* Fixed a compatibility bug that {CSV.generate} always return
{ASCII-8BIT} encoding string.
[GitHub
* Fixed a compatibility bug that `CSV.parse("", headers: true)`
doesn't return {CSV::Table}.
[GitHub#64][Reported by Watson][Patch by 284km]
* Fixed a compatibility bug that multiple-characters column
separator doesn't work.
[GitHub
* Fixed a compatibility bug that double `#each` parse twice.
[GitHub
Thanks
* Watson
* 284km
* Jesse Reiss
* Dave Myron
* Max Schwenk
3.0.2 - 2018-12-23
Improvements
* Changed to use strscan in parser.
[GitHub
* Improves CSV write performance.
3.0 will be about 2 times faster than 3.0.
* Improves CSV parse performance for complex case.
3.0 will be about 2 times faster than 3.0.
Fixes
* Fixed a parse error bug for new line only input with `headers` option.
[GitHub
* Fixed some typos in document.
[GitHub
Thanks
* 284km
* Chris Beer
* Victor Shepelev
3.0.1 - 2018-12-07
Improvements
* Added a test.
[GitHub
* {CSV::Row[GitHub
* Documented `:nil_value` and `:empty_value` options.
[GitHub
* Added support for separator detection for non-seekable inputs.
[GitHub
* Removed needless code.
[GitHub
* Added support for parsing only CSV with `headers: true`.
[GitHub
* Added support for coverage report in CI.
[GitHub
* Improved auto CR row separator detection.
[GitHub
Fixes
* Fixed a typo in document.
[GitHub
Thanks
* 284km
* André Guimarães Sakata
* Marcus Stollsteimer
* OwlWorks
* Ilmari Karonen
* Espartaco Palma
* Kazuma Shibasaka
* Yuki Kurihara
3.0.0 - 2018-06-06
Fixes
* Fixed a bug that isn't returned for empty row.
[GitHub#37][Patch by Grace Lee]
Thanks
* Grace Lee
1.0.2 - 2018-05-03
Improvements
* Split file for CSV::VERSION
* Code cleanup: Split csv.rb into a more manageable structure
[GitHub[GitHub
* Use CSV::MalformedCSVError for invalid encoding line
[GitHub
* Support implicit Row <-> Array conversion
[Bug
* Update class docs
[GitHub
* Add {Row[GitHub
* Improve CSV performance
[GitHub
* Add :nil_value and :empty_value option
Fixes
* Fix a bug that "bom|utf-8" doesn't work
[GitHub#23][Reported by Pavel Lobashov]
* {CSV::Row#to_h}, `#to_hash`: uses the same value as {Row#[]}
[Bug #14482][Reported by tomoya ishida]
* Make row separator detection more robust
[GitHub#25][Reported by deepj]
* Fix a bug that too much separator when col_sep is `" "`
[Bug #8784][ruby-core:63582][Reported by Sylvain Laperche]
Thanks
* Espartaco Palma
* Steven Daniels
* deepj
* Dawid Janczak
* zverok
* Watson
* Pavel Lobashov
* tomoya ishida
* Sylvain Laperche
* Ryunosuke Sato
1.0.1 - 2018-02-09
Improvements
* {CSV::Tablemultiple rows and columns at once.
[GitHub
* Updated Gem description.
[GitHub
* Code cleanup.
[GitHub[GitHub[GitHub
* {CSV::Table[GitHub
* {CSV::Row[GitHub
* Added ISO 8601 support to date time converter.
[GitHub
Fixes
* Fixed wrong {CSV::VERSION}.
[GitHub
* {CSV.generate}: Fixed a regression bug that {String} argument is
ignored.
[GitHub
Thanks
* Vladislav
* Marcus Stollsteimer
* Steven Daniels
* takkanm
* Tomohiro Ogoke
* pavel