[#120] Update freezable? to cover nil

This commit is contained in:
Peter Taoussanis 2020-06-24 12:48:40 +02:00
parent 7aa6425159
commit 721b0fb4eb

View file

@ -93,6 +93,9 @@
test for pre/post serialization value equality (there's no good general test for pre/post serialization value equality (there's no good general
way of doing so)." way of doing so)."
;; TODO Not happy with this approach in general, could do with a refactor.
;; Maybe return true/false/nil (nil => maybe)?
([x] (freezable? x nil)) ([x] (freezable? x nil))
([x {:keys [allow-clojure-reader? allow-java-serializable?]}] ([x {:keys [allow-clojure-reader? allow-java-serializable?]}]
(if (is-coll? x) (if (is-coll? x)
@ -102,6 +105,7 @@
(is? x java.lang.String) (is? x java.lang.String)
(is? x java.lang.Long) (is? x java.lang.Long)
(is? x java.lang.Double) (is? x java.lang.Double)
(nil? x)
(is? x clojure.lang.BigInt) (is? x clojure.lang.BigInt)
(is? x clojure.lang.Ratio) (is? x clojure.lang.Ratio)