bitfab 0.34.0 → 0.34.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 +4 -4
- data/lib/bitfab/serialize.rb +11 -1
- data/lib/bitfab/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: 2e49c89f4d4084e04cc06422bf24853166d662ad16dcde10ff463b9b54994e44
|
|
4
|
+
data.tar.gz: 52554692415bcf2ae1cd985dc737d797e43c93d75bbb813e77ac28f157e10193
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad413e1ed3c64b76fb1fa91e7911cb24d9b4d4e6be71528ca27cbd34e64af1b1a1d834a520c5e222259b0e7816be2b489c7ce33f6864771d32ece59c9b24e23a
|
|
7
|
+
data.tar.gz: c119e56f3b6c81251e05e40e011746e0ec8e33598dd383ceb0e5a4b4c2f04ad4cbfb067df5fe7f7d4eaa1daf293d2bc9d0d9d5999795a385b81086721c0fe0bd
|
data/lib/bitfab/serialize.rb
CHANGED
|
@@ -57,7 +57,17 @@ module Bitfab
|
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
case value
|
|
60
|
-
when
|
|
60
|
+
when Float
|
|
61
|
+
# JSON has no NaN/Infinity literal, so Ruby's generator raises on one.
|
|
62
|
+
# Left unstubbed it kills the encode for the whole batch, not just this
|
|
63
|
+
# span. Mirrors the Python SDK's non_finite_float placeholder.
|
|
64
|
+
if value.finite?
|
|
65
|
+
value
|
|
66
|
+
else
|
|
67
|
+
dropped << "non_finite_float"
|
|
68
|
+
"<unserializable: non_finite_float>"
|
|
69
|
+
end
|
|
70
|
+
when nil, true, false, Integer, String
|
|
61
71
|
value
|
|
62
72
|
when Hash
|
|
63
73
|
value.each_with_object({}) do |(k, v), acc|
|
data/lib/bitfab/version.rb
CHANGED