[fix] Broken *final-freeze-fallback* default val
This commit is contained in:
parent
af928ed6a4
commit
92c4a83d61
2 changed files with 3 additions and 1 deletions
|
|
@ -352,7 +352,7 @@
|
||||||
;; See also `nippy.tools` ns for further dynamic config support
|
;; See also `nippy.tools` ns for further dynamic config support
|
||||||
|
|
||||||
;; For back compatibility (incl. Timbre's Carmine appender)
|
;; For back compatibility (incl. Timbre's Carmine appender)
|
||||||
(enc/defonce ^:dynamic ^:no-doc ^:deprecated *final-freeze-fallback* "Prefer `*freeze-fallback`.")
|
(enc/defonce ^:dynamic ^:no-doc ^:deprecated *final-freeze-fallback* "Prefer `*freeze-fallback`." nil)
|
||||||
(enc/defonce ^:dynamic *freeze-fallback*
|
(enc/defonce ^:dynamic *freeze-fallback*
|
||||||
"Controls Nippy's behaviour when trying to freeze an item for which Nippy
|
"Controls Nippy's behaviour when trying to freeze an item for which Nippy
|
||||||
doesn't currently have a native freeze/thaw implementation.
|
doesn't currently have a native freeze/thaw implementation.
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,8 @@
|
||||||
(let [n range-uint+] (= (thaw (freeze n)) n))
|
(let [n range-uint+] (= (thaw (freeze n)) n))
|
||||||
(let [n (- range-uint+)] (= (thaw (freeze n)) n))]))
|
(let [n (- range-uint+)] (= (thaw (freeze n)) n))]))
|
||||||
|
|
||||||
|
(is (enc/throws? :ex-info "Unfreezable type" (nippy/freeze (fn []))))
|
||||||
|
|
||||||
(is (gen-test 1600 [gen-data] (= gen-data (thaw (freeze gen-data)))) "Generative")])
|
(is (gen-test 1600 [gen-data] (= gen-data (thaw (freeze gen-data)))) "Generative")])
|
||||||
|
|
||||||
;;;; Custom types & records
|
;;;; Custom types & records
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue