parsanol 1.3.117 → 1.3.118

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: '069ffc4a0b824942b8c6e21cbab7a9b0e450636049338c4f38fce28d3109e2d7'
4
- data.tar.gz: 3b1341f63b428c23cfe66169eb0c9c5cf52b98c7af09ee785954f3256fa0db1f
3
+ metadata.gz: 6468b7f70f6c5e61ea1e3661e9a052206730f7f07f71fb9ec9e57777fe777a6d
4
+ data.tar.gz: 17e99bf63b7b0001499e2844c93e4aabf14f64760a85cfc79a6fdad5c290e51e
5
5
  SHA512:
6
- metadata.gz: 7c1d2039bab57923c91d24bf6a791ea86b23d71d576e51e51140f4bcd5044b962fb6fd333ba1c0df4ecdcd8828d0547f380c2d5c54520e3bb7a588c62b427ddb
7
- data.tar.gz: 7d321301a11d0a437a964930c77d84a80bdd112be959476f8be087b585649efd36fd197f0b915bb51e5b865953ef3670ddbe77e66b910f450c7bb3976958d68d
6
+ metadata.gz: 90a1d39c526c512b4d7a55bc328b0530a92ae010c4a4febb91cc8b5408d0d070c20ef4e2cda81695c739fb94bdd29421434eb806c52b6ac060ac85fd8380c615
7
+ data.tar.gz: '083ed02a83cfbbbe16ef6bd3ec922229a35c52f9d81935458b86fbce4433264038ad390ed958b4602b0a414a7aad7dadf06e052e1fdb9f40c935465c74665308'
data/Cargo.lock CHANGED
@@ -307,9 +307,9 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
307
307
 
308
308
  [[package]]
309
309
  name = "parsanol"
310
- version = "0.19.14"
310
+ version = "0.19.15"
311
311
  source = "registry+https://github.com/rust-lang/crates.io-index"
312
- checksum = "27faaa398cc92b331b0e1d08abfa475e697e8d23b0ea90e211a3dc8590e42bbd"
312
+ checksum = "f14e6d53cab2665d789adc8e28ff2181899501ef56afc4d65100f09a6d9c8101"
313
313
  dependencies = [
314
314
  "ahash",
315
315
  "getrandom 0.3.4",
@@ -326,9 +326,9 @@ dependencies = [
326
326
 
327
327
  [[package]]
328
328
  name = "parsanol-derive"
329
- version = "0.19.14"
329
+ version = "0.19.15"
330
330
  source = "registry+https://github.com/rust-lang/crates.io-index"
331
- checksum = "b6a65826a4a1f7ec796e29916963803a3deff86f9f9de9e8180f49f6173292a4"
331
+ checksum = "a5066e2da7badb25efb562dbebb6d0fc287e6e4dc7bd06b1da4b502bf349d94d"
332
332
  dependencies = [
333
333
  "proc-macro2",
334
334
  "quote",
@@ -185,9 +185,31 @@ module Parsanol
185
185
 
186
186
  value.to_s
187
187
  when "boolean" then value == true || value.to_s.casecmp("true").zero?
188
+ when "any"
189
+ # The ONE plain shape on every engine (ruby#383): scalars and
190
+ # capture leaves render as their text, named groups as plain
191
+ # string-keyed hashes, repeats as arrays — so (any)-bound keys
192
+ # survive a cross-engine gate without consumer shims.
193
+ plain(value)
188
194
  else value
189
195
  end
190
196
  end
197
+
198
+ # The engine-neutral reduction behind (any): capture leaves
199
+ # (Parsanol::Slice, native wire objects) and scalars render as
200
+ # their text, hashes as string-keyed plain hashes, arrays
201
+ # recurse. Nil passes through (absent captures stay absent —
202
+ # assign_scalar/assign_array skip them upstream).
203
+ def plain(value)
204
+ case value
205
+ when nil then nil
206
+ when String then value
207
+ when Hash
208
+ value.to_h { |key, item| [key.to_s, plain(item)] }
209
+ when Array then value.map { |item| plain(item) }
210
+ else value.to_s
211
+ end
212
+ end
191
213
  end
192
214
  end
193
215
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parsanol
4
- VERSION = "1.3.117"
4
+ VERSION = "1.3.118"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsanol
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.117
4
+ version: 1.3.118
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.