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 +4 -4
- data/Cargo.lock +4 -4
- data/lib/parsanol/parg/bindings.rb +22 -0
- data/lib/parsanol/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6468b7f70f6c5e61ea1e3661e9a052206730f7f07f71fb9ec9e57777fe777a6d
|
|
4
|
+
data.tar.gz: 17e99bf63b7b0001499e2844c93e4aabf14f64760a85cfc79a6fdad5c290e51e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
310
|
+
version = "0.19.15"
|
|
311
311
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
312
|
-
checksum = "
|
|
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.
|
|
329
|
+
version = "0.19.15"
|
|
330
330
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
331
|
-
checksum = "
|
|
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
|
data/lib/parsanol/version.rb
CHANGED