Kouhei Sutou
198281a71d
[ruby/csv] Fix a bug that strip: true removes newlines
...
https://github.com/ruby/csv/commit/5540d35a30
2019-07-14 23:07:31 +09:00
Kouhei Sutou
8392592a0a
[ruby/csv] Don't raise on eof?
...
GitHub: fix #86
Reported by krororo. Thanks!!!
https://github.com/ruby/csv/commit/5a8d9d9297
2019-07-14 23:07:31 +09:00
Hiroshi SHIBATA
9f275f7971
Restore support library for only test files that are digest and csv.
2019-07-09 21:16:49 +09:00
Nobuyoshi Nakada
832b509472
with_different_ofs.rb has been moved too
2019-07-02 09:43:33 +09:00
Nobuyoshi Nakada
45ba027d08
Removed unused variables
2019-06-30 08:45:01 +09:00
kou
3791bdf080
Import CSV 3.0.9
...
This fixes test failures on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-15 02:05:03 +00:00
kou
e3b6c7c7eb
Import CSV 3.0.8
...
This includes performance improvements and backward incompatibility
fixes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 21:01:51 +00:00
kou
24b57b102c
Upgrade CSV to 3.0.4
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-25 06:49:59 +00:00
nobu
71e458023d
remove trailing spaces [ci skip]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-23 11:11:35 +00:00
kou
e5d634260e
Import CSV 3.0.2
...
This includes performance improvement especially writing. Writing is
about 2 times faster.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-23 07:00:35 +00:00
hsbt
60ebd4e26a
Merge csv-3.0.0 from ruby/csv repository.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-05 13:33:21 +00:00
hsbt
5c1941a9be
Merge csv-1.0.2 from upstream.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-09 04:39:16 +00:00
mame
c1d0768f34
test/csv/test_features.rb: enable accidentally-disabled assertions
...
CSV.new does not yield the instance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-17 07:03:44 +00:00
k0kubun
08bb7d3d19
test_features.rb: fix unused variable warning
...
test/csv/test_features.rb:357: warning: assigned but unused variable - csv
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-26 10:45:14 +00:00
hsbt
ffb49a7e9b
Fixed regression to convert blank value at r45497.
...
[Bug #11126 ][ruby-core:69088]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-22 06:57:00 +00:00
hsbt
ede0df3a9b
Gracefully handle CSV IO when file descriptor closed.
...
[Bug #10504 ][ruby-core:66240]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-22 06:40:59 +00:00
hsbt
20aed4495b
Fixed equality method fails when given the object that doesn't support table method.
...
[Bug #12422 ][ruby-core:75707]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-22 06:34:27 +00:00
hsbt
9c38a08f28
Fixed to write_headers option behavior when given no rows.
...
[Bug #9988 ][ruby-core:63375]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-22 06:17:42 +00:00
hsbt
2c69f7b278
Escape skip_lines string before convert to Regexp.
...
It ignored all of lines when given Regexp special characters.
[Feature #9147 ][ruby-core:58549]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-22 05:32:34 +00:00
glass
32eeff1708
csv.rb: fix incompatibility introduced in r59428
...
* lib/csv.rb: fix incompatibility introduced in r59428.
CSV.new takes options as keyword arguments.
* test/csv/test_features.rb: add a test to ensure it raises error againt
unknown options
* test/csv/test_features.rb: add a test to ensure row_sep option is properly
applied
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-28 07:46:20 +00:00
glass
a983fc5022
csv.rb: use keyword parameters
...
* lib/csv.rb: usb keyword parameters to receive options
* test/csv/test_features.rb: remove a test for checking options
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-27 09:53:58 +00:00
hsbt
87acdae43d
Strip punctuation from CSV headers in symbol converter.
...
Patch by @cllns. [Fix GH-957]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 09:32:32 +00:00
hsbt
3b77cb2a64
Added accessor of original line when parsing.
...
[Feature #11865 ][ruby-core:72452][fix GH-1170]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 09:17:09 +00:00
nobu
5bb125c63e
csv.rb: fix field_size_limit check
...
* lib/csv.rb (CSV#shift): the last column is an Array in extended
column since r55985. [ruby-dev:49964] [Bug #13149 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 05:59:28 +00:00
ktsj
b425d4f19a
* lib/csv.rb (CSV::{Row,Table}#{each,delete_if}): returns an enumerator
...
if no block is given. [ruby-core:75346] [Feature #11058 ]
* test/csv/test_row.rb: add test for above.
* test/csv/test_table.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-07 06:06:09 +00:00
akr
449fbfd4d4
Use Integer instead of Fixnum and Bignum.
...
* object.c, numeric.c, enum.c, ext/-test-/bignum/mul.c,
lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rexml/xpath_parser.rb,
lib/rubygems/specification.rb, lib/uri/generic.rb,
bootstraptest/test_eval.rb, basictest/test.rb,
test/-ext-/bignum/test_big2str.rb, test/-ext-/bignum/test_div.rb,
test/-ext-/bignum/test_mul.rb, test/-ext-/bignum/test_str2big.rb,
test/csv/test_data_converters.rb, test/date/test_date.rb,
test/json/test_json_generate.rb, test/minitest/test_minitest_mock.rb,
test/openssl/test_cipher.rb, test/rexml/test_jaxen.rb,
test/ruby/test_array.rb, test/ruby/test_basicinstructions.rb,
test/ruby/test_bignum.rb, test/ruby/test_case.rb,
test/ruby/test_class.rb, test/ruby/test_complex.rb,
test/ruby/test_enum.rb, test/ruby/test_eval.rb,
test/ruby/test_iseq.rb, test/ruby/test_literal.rb,
test/ruby/test_math.rb, test/ruby/test_module.rb,
test/ruby/test_numeric.rb, test/ruby/test_range.rb,
test/ruby/test_rational.rb, test/ruby/test_refinement.rb,
test/ruby/test_rubyvm.rb, test/ruby/test_struct.rb,
test/ruby/test_variable.rb, test/rubygems/test_gem_specification.rb,
test/thread/test_queue.rb: Use Integer instead of Fixnum and Bignum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 13:15:57 +00:00
jeg2
f18f940802
Adding a liberal_parsing option to CSV. Patch by Braden Anderson.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-01 02:44:48 +00:00
naruse
3e92b635fb
Add frozen_string_literal: false for all files
...
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
hsbt
96fb819676
* lib/csv.rb: accept to use Range object for row selection.
...
[Feature #11267 ][ruby-dev:49091]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-17 01:58:34 +00:00
hsbt
7e3b185a25
* test/csv/test_row.rb: Added some missing tests in CSV.
...
* test/csv/test_table.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 09:34:38 +00:00
hsbt
767358108e
* test/with_different_ofs.rb: move into test library directory.
...
* test/csv/base.rb: fix require path for with_different_ofs.rb.
* test/digest/test_digest_extend.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 09:27:22 +00:00
nobu
f9a5335ed4
csv.rb: honor encoding option
...
* 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
2014-06-10 01:57:10 +00:00
akr
2ad2007307
* lib/csv.rb (CSV.open): Close the opened file when an exception occur.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-29 10:44:59 +00:00
nobu
ae3022e434
test_features.rb: fix up r46123
...
* test/csv/test_features.rb: no longer `nil` is valid data source
for `CSV.new`. [GH-580]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-26 02:58:15 +00:00
zzak
0aa197c6f2
* lib/csv.rb: Reject nil as data source for CSV.new, patch by @Peeja.
...
[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
2014-05-25 16:41:40 +00:00
jeg2
1170b057e0
* lib/csv.rb: Symbol HeaderConverter: strip leading/trailing space.
...
Reported by Skye Shaw
[Fixes GH-575]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-01 14:40:48 +00:00
jeg2
7c4d4e1eb2
* lib/csv.rb: Don't attempt to convert nil headers.
...
Reported by Skye Shaw
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-01 14:35:03 +00:00
jeg2
3fb752a921
* lib/csv.rb: Fixed a broken regular expression that was causing
...
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
2014-03-20 14:38:21 +00:00
nobu
2d89896461
* test/csv/test_data_converters.rb: use descriptive assertions.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01 07:08:19 +00:00
jeg2
895e9b0acd
* lib/csv.rb: Optimize header hashes by freezing string keys.
...
[ruby-core:58510]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-24 00:44:41 +00:00
jeg2
80c4b4b3d7
* lib/csv.rb: If skip_lines is set to a String, convert it to a Regexp
...
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
2013-11-23 23:12:11 +00:00
nobu
28204c67ed
csv.rb: foreach enumerator
...
* 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
2013-10-04 00:32:35 +00:00
nobu
d8441fcc6e
encdb.c, encoding.c: make BOM-encodings dummy
...
* enc/encdb.c (ENC_DUMMY_UNICODE): make BOM-encodings dummy.
* encoding.c (enc_autoload): keep dummy encodings dummy.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24 08:15:18 +00:00
nobu
84a5622646
test_encodings.rb: remove BOM encodings
...
* test/csv/test_encodings.rb (TestCSV#each_encoding): encodings with
BOM are external use only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24 07:48:51 +00:00
akr
8f671120f1
* test/csv/test_features.rb, test/logger/test_logger.rb
...
test/mkmf/test_have_macro.rb, test/net/http/test_http.rb,
test/openssl/test_config.rb, test/psych/test_encoding.rb,
test/psych/test_exception.rb, test/psych/test_psych.rb,
test/psych/test_tainted.rb, test/readline/test_readline.rb,
test/rexml/test_contrib.rb, test/ruby/test_autoload.rb,
test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb,
test/ruby/test_file.rb, test/ruby/test_io.rb,
test/ruby/test_marshal.rb, test/ruby/test_process.rb,
test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb,
test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb,
test/zlib/test_zlib.rb: Use Tempfile.create.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-20 23:03:52 +00:00
jeg2
b614d7823c
* lib/csv.rb: Remove the dangerous serialization feature.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 18:28:26 +00:00
jeg2
93030d0e4d
* lib/csv.rb: Added more Hash methods to CSV::Row.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-27 16:15:53 +00:00
jeg2
5b1065f3fe
* lib/csv.rb: A fix for row comparison by Stephen Wattam. [Bug #7528 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07 17:42:16 +00:00
nobu
d059d718b5
remove trainling spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 04:50:18 +00:00
jeg2
3c3e659196
* lib/csv.rb: Fixes #161 on github
...
* 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
2012-08-20 20:52:36 +00:00