Skip to content

Commit

Permalink
[#120] Update freezable? to cover nil
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Jun 24, 2020
1 parent 4a3c1eb commit 74a6cea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/taoensso/nippy/utils.clj
Expand Up @@ -93,6 +93,9 @@
test for pre/post serialization value equality (there's no good general
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 {:keys [allow-clojure-reader? allow-java-serializable?]}]
(if (is-coll? x)
Expand All @@ -102,6 +105,7 @@
(is? x java.lang.String)
(is? x java.lang.Long)
(is? x java.lang.Double)
(nil? x)

(is? x clojure.lang.BigInt)
(is? x clojure.lang.Ratio)
Expand Down

0 comments on commit 74a6cea

Please sign in to comment.