diff --git a/src/sci/impl/read.cljc b/src/sci/impl/read.cljc index 054038ac..9e83c41d 100644 --- a/src/sci/impl/read.cljc +++ b/src/sci/impl/read.cljc @@ -58,10 +58,10 @@ (defn read-string ([sci-ctx s] - (let [reader (r/indexing-push-back-reader (r/string-push-back-reader s))] + (let [reader (r/string-push-back-reader s)] (read sci-ctx reader))) ([sci-ctx opts s] - (let [reader (r/indexing-push-back-reader (r/string-push-back-reader s))] + (let [reader (r/string-push-back-reader s)] (read sci-ctx opts reader)))) (defn load-string [sci-ctx s] diff --git a/test/sci/core_test.cljc b/test/sci/core_test.cljc index 245f075c..a77d7199 100644 --- a/test/sci/core_test.cljc +++ b/test/sci/core_test.cljc @@ -1217,7 +1217,8 @@ (is (thrown-with-msg? #?(:clj Exception :cljs js/Error) #"loop.*allowed" (tu/eval* "(eval (read-string \"(loop [] (recur))\"))" {:deny '[loop]}))) (is (thrown-with-msg? #?(:clj Exception :cljs js/Error) #"loop.*allowed" - (tu/eval* "(load-string \"(loop [] (recur))\")" {:deny '[loop]})))) + (tu/eval* "(load-string \"(loop [] (recur))\")" {:deny '[loop]}))) + (is (nil? (meta (tu/eval* "(read-string \"(+ 1 2 3)\")" nil))))) (deftest while-test (is (= 10 (eval* "(def a (atom 0)) (while (< @a 10) (swap! a inc)) @a"))))