Skip to content

Commit

Permalink
Fix babashka#236: also coerce set to bencode
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Jul 13, 2022
1 parent ace717f commit cd1b4d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions script/nbb_nrepl_tests.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
(defn nrepl-server []
(swap! port inc)
(process ["node" "lib/nbb_main.js" "nrepl-server" ":port" @port]
(merge {:out :inherit
:err :inherit})))
{:out :inherit
:err :inherit}))

(defn bytes->str [x]
(if (bytes? x) (String. (bytes x))
Expand Down
2 changes: 1 addition & 1 deletion src/nbb/impl/bencode.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
(name data)))
(number? data)
(str "i" data "e")
(or (vector? data) (nil? data))
(or (set? data) (vector? data) (nil? data))
(str "l" (apply str (map encode data)) "e")
(map? data)
(str "d" (->> data
Expand Down

0 comments on commit cd1b4d7

Please sign in to comment.