smarter_csv 1.17.0 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 702bd7049e83c0beb85f0ca11a122e6f1659eddef6afec66eaf1c37c5b30f43f
4
- data.tar.gz: dd1915694d041c9b631324de7408f46fc8f426f9e1c60136c35a8f1e754d4590
3
+ metadata.gz: 1af96fa0d5394ea752b09577f5a0a212d2dca492d78c17574bf03f46bcef5198
4
+ data.tar.gz: 86c03a5bf89779ab84e9e8eda19b5d2c6b0d384fb99bcb1d1fa96d4e88c4afca
5
5
  SHA512:
6
- metadata.gz: fa00d07c21cffa711a43ecb4622ad3a09b667f1c1965ad26bee864ada6a3c168076ec04550781c75c4f0acbb28fcab60001278f459cf3065cceaef6820764e30
7
- data.tar.gz: eab835a356e5343e20a5cc0784ffd9aafa8ab631256d412ec570a0192060b8f3e9c6f619db36e59494364f6c51cda16a9c434c2565ef5a5b6e23f4813a7eaaef
6
+ metadata.gz: ff21d28fb33ed6b6b3d77056b4e9ea302dc93947f06aa2ddb5b3d5fe5faec47f8fb315cb986987b8d4685857ad397797c8f5a97004e82515faa22fb2b69ae704
7
+ data.tar.gz: 808646d031b77162163041b65d8269ac8d93e7fb8f4c284a2cfabface0e867e393881192769813d78c563d91ca9bdd8fc7a4903e2396f175dd3d89a5dfc0cd44
data/CHANGELOG.md CHANGED
@@ -1,7 +1,16 @@
1
1
 
2
2
  # SmarterCSV 1.x Change Log
3
3
 
4
- ## 1.17.0 (NOT RELEASED)
4
+
5
+ ## 1.17.1 (2026-05-18)
6
+
7
+ RSpec tests: **2,210→ 2,220** (+10 tests)
8
+
9
+ ### Bug Fix
10
+
11
+ - fixing issue with `remove_empty_hashes: false` not being honored in accelerated path (does not affect you when you use default settings)
12
+
13
+ ## 1.17.0 (2026-05-14)
5
14
 
6
15
  RSpec tests: **1,434 → 2,210** (+776 tests)
7
16
 
@@ -55,6 +64,13 @@ Measured against 1.16.4 (Apple M4, Ruby 3.4.7):
55
64
 
56
65
  Per-file breakdown: [`docs/releases/1.17.0/performance_notes.md`](docs/releases/1.17.0/performance_notes.md).
57
66
 
67
+ ## 1.16.5 (2026-05-18)
68
+
69
+ ### Bug Fix
70
+
71
+ - fixing issue with `remove_empty_hashes: false` not being honored in accelerated path (does not affect you when you use default settings)
72
+
73
+
58
74
  ## 1.16.4 (2026-04-21) — Bug Fixes
59
75
 
60
76
  RSpec tests: **1,434 → 1,467** (+33 tests)
@@ -206,6 +222,11 @@ Measured on 19 benchmark files, Apple M1, Ruby 3.4.7. See [benchmarks](docs/rele
206
222
  * **Writer temp file** no longer hardcoded to `/tmp` (fixes Windows); properly cleaned up with `Tempfile#close!`.
207
223
  * **Writer `StringIO`**: `finalize` no longer attempts to close a caller-owned `StringIO`.
208
224
 
225
+ ## 1.15.3 (2026-05-18)
226
+
227
+ ### Bug Fix
228
+
229
+ - fixing issue with `remove_empty_hashes: false` not being honored in accelerated path (does not affect you when you use default settings)
209
230
 
210
231
  ## 1.15.2 (2026-02-20)
211
232
 
@@ -1242,12 +1242,20 @@ __attribute__((hot)) static VALUE rb_parse_line_to_hash(VALUE self, VALUE line,
1242
1242
  * return nil instead of the hash so the row can be skipped.
1243
1243
  * With lazy allocation, if all_blank is true, xform.hash is still Qnil —
1244
1244
  * no hash was ever allocated.
1245
+ *
1246
+ * If remove_empty_hashes is disabled, preserve the row as an empty hash.
1247
+ * This keeps parity with the Ruby path without impacting the normal
1248
+ * non-blank hot path.
1245
1249
  */
1246
- if (remove_empty && all_blank) {
1247
- VALUE result = rb_ary_new_capa(2);
1248
- rb_ary_push(result, Qnil);
1249
- rb_ary_push(result, LONG2FIX(element_count));
1250
- return result;
1250
+ if (all_blank) {
1251
+ if (remove_empty) {
1252
+ VALUE result = rb_ary_new_capa(2);
1253
+ rb_ary_push(result, Qnil);
1254
+ rb_ary_push(result, LONG2FIX(element_count));
1255
+ return result;
1256
+ }
1257
+
1258
+ ensure_hash_allocated(&xform);
1251
1259
  }
1252
1260
 
1253
1261
  /* ----------------------------------------
@@ -1794,11 +1802,15 @@ __attribute__((hot)) static VALUE rb_parse_line_to_hash_ctx(VALUE self, VALUE li
1794
1802
  /* ----------------------------------------
1795
1803
  * SECTION 6: Handle blank rows
1796
1804
  * ---------------------------------------- */
1797
- if (remove_empty && all_blank) {
1798
- VALUE result = rb_ary_new_capa(2);
1799
- rb_ary_push(result, Qnil);
1800
- rb_ary_push(result, LONG2FIX(element_count));
1801
- return result;
1805
+ if (all_blank) {
1806
+ if (remove_empty) {
1807
+ VALUE result = rb_ary_new_capa(2);
1808
+ rb_ary_push(result, Qnil);
1809
+ rb_ary_push(result, LONG2FIX(element_count));
1810
+ return result;
1811
+ }
1812
+
1813
+ ensure_hash_allocated(&xform);
1802
1814
  }
1803
1815
 
1804
1816
  /* ----------------------------------------
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SmarterCSV
4
- VERSION = "1.17.0"
4
+ VERSION = "1.17.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smarter_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilo Sloboda
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-05-14 00:00:00.000000000 Z
10
+ date: 2026-05-17 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: |
13
13
  SmarterCSV is a high-performance CSV reader and writer for Ruby focused on