Commit d628376
Scope ZIP64 disabling to save/stream instead of global config
PR #170 fixed #168 by setting Zip.write_zip64_support = false at the
top level when docx is required. That mutates global rubyzip state for
the whole host application, which can break other code that relies on
ZIP64 (flagged by Copilot review on #170).
Instead, disable ZIP64 only while writing in #save / #stream via a
with_zip64_disabled helper that restores the previous global value in
an ensure block, so other rubyzip users are unaffected. Adds regression
specs asserting the setting is not leaked after saving/streaming, and a
CHANGELOG entry.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 16e42c2 commit d628376
2 files changed
Lines changed: 64 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 8 | | |
14 | 9 | | |
15 | 10 | | |
| |||
133 | 128 | | |
134 | 129 | | |
135 | 130 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
140 | 136 | | |
141 | | - | |
142 | | - | |
| 137 | + | |
| 138 | + | |
143 | 139 | | |
144 | | - | |
145 | | - | |
| 140 | + | |
| 141 | + | |
146 | 142 | | |
| 143 | + | |
| 144 | + | |
147 | 145 | | |
148 | | - | |
149 | 146 | | |
150 | 147 | | |
151 | 148 | | |
152 | 149 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
164 | 163 | | |
165 | 164 | | |
166 | | - | |
167 | 165 | | |
168 | | - | |
169 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
| |||
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
192 | 203 | | |
193 | 204 | | |
194 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
379 | 404 | | |
380 | 405 | | |
381 | 406 | | |
| |||
0 commit comments