csv 3.2.8 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c64817c16c8991fc2596875101449b5452326fe91bd05e4bb6a66213113525d6
4
- data.tar.gz: 19d6d80d6959f6cde0ac651774ea795dbd0f949135cae021fef3983d94248f9c
3
+ metadata.gz: 4be2aab05afe081e964c806337cab1e8763532ecf66ef29bb8f6854cd65b29bf
4
+ data.tar.gz: 716f28f2377749b95d8f5f9f19a7cba50499e4ff46c4978efdc002ba25162475
5
5
  SHA512:
6
- metadata.gz: 556f6582468d4a3c2994c12c25dba73b8db65e1a10f7306b9b5bc1fa345f47bf7872db1c603ddcd1a0eb359e7857c51a9874be2231dc821730ae62d15604c3b7
7
- data.tar.gz: 348a25f4c1bb8e4fe0d71dc944e0a26165627803cb2528fc067642827fd3c253bda48aba179d3575950a7244bd4e8edf2eed9a99101952a07256a3f4f9d1e7fe
6
+ metadata.gz: bc67687257ea7790091d9755199624dced05c3ea07a9afc47b86cc49dac1dfce77b884e1c2397de71f1f2de22720778135373652d7af05acb990814e6fa2d940
7
+ data.tar.gz: fce6230a6fdcff2ae8044a0f374ea71403cdf1f59d2024bb64a87ade52a897a907dfcb271b39d1ad81299cbd9eebf2ca43008dec99d86648550f73584d8c468c
data/NEWS.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # News
2
2
 
3
+ ## 3.3.0 - 2024-03-22
4
+
5
+ ### Fixes
6
+
7
+ * Fixed a regression parse bug in 3.2.9 that parsing with
8
+ `:skip_lines` may cause wrong result.
9
+
10
+ ## 3.2.9 - 2024-03-22
11
+
12
+ ### Fixes
13
+
14
+ * Fixed a parse bug that wrong result may be happen when:
15
+
16
+ * `:skip_lines` is used
17
+ * `:row_separator` is `"\r\n"`
18
+ * There is a line that includes `\n` as a column value
19
+
20
+ Reported by Ryo Tsukamoto.
21
+
22
+ GH-296
23
+
24
+ ### Thanks
25
+
26
+ * Ryo Tsukamoto
27
+
3
28
  ## 3.2.8 - 2023-11-08
4
29
 
5
30
  ### Improvements
data/README.md CHANGED
@@ -30,8 +30,8 @@ end
30
30
 
31
31
  ## Documentation
32
32
 
33
- - [API](https://ruby-doc.org/stdlib/libdoc/csv/rdoc/CSV.html): all classes, methods, and constants.
34
- - [Recipes](https://ruby-doc.org/core/doc/csv/recipes/recipes_rdoc.html): specific code for specific tasks.
33
+ - [API](https://ruby.github.io/csv/): all classes, methods, and constants.
34
+ - [Recipes](https://ruby.github.io/csv/doc/csv/recipes/recipes_rdoc.html): specific code for specific tasks.
35
35
 
36
36
  ## Development
37
37
 
data/lib/csv/parser.rb CHANGED
@@ -220,6 +220,15 @@ class CSV
220
220
  end
221
221
  # trace(__method__, :repos, start, buffer)
222
222
  @scanner.pos = start
223
+ last_scanner, last_start, last_buffer = @keeps.last
224
+ # Drop the last buffer when the last buffer is the same data
225
+ # in the last keep. If we keep it, we have duplicated data
226
+ # by the next keep_back.
227
+ if last_scanner == @scanner and
228
+ last_buffer and
229
+ last_buffer == last_scanner.string.byteslice(last_start, start)
230
+ @keeps.last[2] = nil
231
+ end
223
232
  end
224
233
  read_chunk if @scanner.eos?
225
234
  end
data/lib/csv/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  class CSV
4
4
  # The version of the installed library.
5
- VERSION = "3.2.8"
5
+ VERSION = "3.3.0"
6
6
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.8
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Edward Gray II
8
8
  - Kouhei Sutou
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2023-11-08 00:00:00.000000000 Z
11
+ date: 2024-03-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
@@ -128,7 +127,6 @@ licenses:
128
127
  - Ruby
129
128
  - BSD-2-Clause
130
129
  metadata: {}
131
- post_install_message:
132
130
  rdoc_options:
133
131
  - "--main"
134
132
  - README.md
@@ -145,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
143
  - !ruby/object:Gem::Version
146
144
  version: '0'
147
145
  requirements: []
148
- rubygems_version: 3.5.0.dev
149
- signing_key:
146
+ rubygems_version: 3.6.0.dev
150
147
  specification_version: 4
151
148
  summary: CSV Reading and Writing
152
149
  test_files: []