Skip to content

Commit

Permalink
[#48] Fix freeze/thaw identity on empty lazy seqs
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Apr 29, 2014
1 parent 0ff3654 commit 3c8661a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/taoensso/nippy.clj
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@
id-vector (read-coll in [])
id-set (read-coll in #{})
id-map (read-kvs in {})
id-seq (seq (read-coll in []))
id-seq (or (seq (read-coll in []))
(lazy-seq nil) ; Empty coll
)

id-meta (let [m (thaw-from-in in)] (with-meta (thaw-from-in in) m))

Expand Down Expand Up @@ -666,6 +668,7 @@
:meta (with-meta {:a :A} {:metakey :metaval})

:lazy-seq (repeatedly 1000 rand)
:lazy-seq-empty (map identity '())

:byte (byte 16)
:short (short 42)
Expand Down

0 comments on commit 3c8661a

Please sign in to comment.