Commit graph

26 commits

Author SHA1 Message Date
Takashi Kokubun
2e875549a9 s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
Sutou Kouhei
a350ef9f7a [ruby/csv] test: use mailing list ID instead of unavailable URL
04862ccf87
2023-02-21 19:31:29 +09:00
Vivek Bharath Akupatni
2ac1efc0f3 [ruby/csv] Use https links instead of http
(https://github.com/ruby/csv/pull/274)

e2a06929a8
2023-02-21 19:31:29 +09:00
Hiroshi SHIBATA
bcf01b18cf Reapply the following commits related to extend timeout value.
66d1900423
  0686e4181d
  1a63468831
  e1fee7f949
  232e43fd52
2022-12-09 16:36:22 +09:00
Hiroshi SHIBATA
643918ecfe Merge csv-3.2.6 2022-12-09 16:36:22 +09:00
Takashi Kokubun
232e43fd52 Respect RUBY_TESTOPTS on test-all (https://github.com/Shopify/ruby/pull/435)
* Respect RUBY_TESTOPTS on test-all

* Increase the Cirrus timeout

* Increase the CSV test timeout
2022-08-29 09:09:41 -07:00
Sutou Kouhei
1a1550ba5d [ruby/csv] test: reduce size for stability on GitHub Actions
68461aead5
2021-12-24 14:35:33 +09:00
Sutou Kouhei
22ef4f6445 [ruby/csv] Revert "parser: fix a keep bug that some texts may be dropped unexpectedly"
This reverts commit 5c6523da0a.

This introduces another pbolem. We should try again later.

43a1d6fff1
2021-12-24 14:35:33 +09:00
Sutou Kouhei
4a5d372ca8 [ruby/csv] parser: fix a keep bug that some texts may be dropped unexpectedly
Ruby: [Bug #18245] [ruby-core:105587]

Reported by Hassan Abdul Rehman.

5c6523da0a
2021-12-24 14:35:33 +09:00
adamroyjones
c70dc3cafb [ruby/csv] Add handling for ambiguous parsing options (https://github.com/ruby/csv/pull/226)
GitHub: fix GH-225

With Ruby 3.0.2 and csv 3.2.1, the file

```ruby
require "csv"
File.open("example.tsv", "w") { |f| f.puts("foo\t\tbar") }
CSV.read("example.tsv", col_sep: "\t", strip: true)
```

produces the error

```
lib/csv/parser.rb:935:in `parse_quotable_robust': TODO: Meaningful
message in line 1. (CSV::MalformedCSVError)
```

However, the CSV in this example is not malformed; instead, ambiguous
options were provided to the parser. It is not obvious (to me) whether
the string should be parsed as

- `["foo\t\tbar"]`,
- `["foo", "bar"]`,
- `["foo", "", "bar"]`, or
- `["foo", nil, "bar"]`.

This commit adds code that raises an exception when this situation is
encountered. Specifically, it checks if the column separator either ends
with or starts with the characters that would be stripped away.

This commit also adds unit tests and updates the documentation.

cc317dd42d
2021-12-24 14:35:33 +09:00
Nobuyoshi Nakada
47c53af168 [ruby/csv] Fix typos [ci skip] (https://github.com/ruby/csv/pull/224)
27c0b66c8f
2021-12-24 14:35:33 +09:00
Takashi Kokubun
1a63468831
Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
Joakim Antman
7f3dd601c8 [ruby/csv] Changed line ending handling to consider the combination \r\n as a single entry when row is faulty (https://github.com/ruby/csv/pull/220)
29cef9ea9d
2021-10-24 05:57:33 +09:00
Takashi Kokubun
e1fee7f949
Rename RubyVM::MJIT to RubyVM::JIT
because the name "MJIT" is an internal code name, it's inconsistent with
--jit while they are related to each other, and I want to discourage future
JIT implementation-specific (e.g. MJIT-specific) APIs by this rename.

[Feature #17490]
2021-01-13 22:46:51 -08:00
Sutou Kouhei
832b7f3c54 [ruby/csv] Add support for \r\n with skip_lines: /...$/ again
GitHub: fix GH-194

Reported by Josef Šimánek. Thanks!!!

fd86afe081
2020-11-24 09:33:55 +09:00
Sutou Kouhei
814bfc8adc
[ruby/csv] Fix a parse bug when split character exists in middle of column value
GitHub: fix #115

Reported by TOMITA Masahiro. Thanks!!!

398b3564c5
2020-07-20 02:32:49 +09:00
Mike MacDonald
d57bc03ba9
[ruby/csv] Do not loop forever when skip_lines regexp matches zero length with anchors (#110)
* Do not loop forever when skip_lines regexp matches zero length with anchors

* Remove needless white spaces

* Add missing eos check in skip_needless_lines

* Simplify test

3b15d4a3e8
2020-07-20 02:32:49 +09:00
Nobuyoshi Nakada
0686e4181d
Fixed for older versions
Fix up 66d1900423, `RubyVM::MJIT` is
available since ruby 2.6.
2020-02-26 10:16:32 +09:00
Takashi Kokubun
66d1900423
Increase timeout for CSV test with --jit-wait
To prevent CI failures like
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2739995
2020-02-25 09:27:24 -08:00
Sutou Kouhei
92df7d98b6
Import CSV 3.1.2 (#2547) 2019-10-12 14:03:21 +09:00
Jeremy Evans
146677a1e7 Fix keyword argument warnings in the tests from Class#new
This were previously hidden because calls from C were not warned.
2019-09-06 19:41:23 -07:00
Jeremy Evans
e0b4599bba Fix keyword argument separation warnings in test 2019-08-30 12:39:31 -07:00
Kouhei Sutou
198281a71d [ruby/csv] Fix a bug that strip: true removes newlines
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!!!

5a8d9d9297
2019-07-14 23:07:31 +09: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