From cd1b4d7cc7a5d9962859f84ae848ac0b0201a352 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Wed, 13 Jul 2022 11:02:33 +0200 Subject: [PATCH] Fix #236: also coerce set to bencode --- script/nbb_nrepl_tests.clj | 4 ++-- src/nbb/impl/bencode.cljs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script/nbb_nrepl_tests.clj b/script/nbb_nrepl_tests.clj index b3957283..475986f4 100755 --- a/script/nbb_nrepl_tests.clj +++ b/script/nbb_nrepl_tests.clj @@ -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)) diff --git a/src/nbb/impl/bencode.cljs b/src/nbb/impl/bencode.cljs index 7c5ee0fd..92885f4c 100644 --- a/src/nbb/impl/bencode.cljs +++ b/src/nbb/impl/bencode.cljs @@ -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