From 20f3277b03e7acb0c0558ffd6053a023a6e1608a Mon Sep 17 00:00:00 2001 From: dnolen Date: Fri, 24 Apr 2020 12:05:03 -0400 Subject: [PATCH] 1.10.740 --- README.md | 6 +++--- changes.md | 2 +- src/main/cljs/cljs/core.cljs | 2 +- src/test/cljs/cljs/seqs_test.cljs | 5 +++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 005102d021..295d8a4fb2 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,14 @@ Official web site: http://clojurescript.org ## Releases and dependency information ## -Latest stable release: 1.10.739 +Latest stable release: 1.10.740 * [All released versions](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22clojurescript%22) [Leiningen](http://github.com/technomancy/leiningen/) dependency information: ``` -[org.clojure/clojurescript "1.10.739"] +[org.clojure/clojurescript "1.10.740"] ``` [Maven](http://maven.apache.org) dependency information: @@ -22,7 +22,7 @@ Latest stable release: 1.10.739 org.clojure clojurescript - 1.10.739 + 1.10.740 ``` diff --git a/changes.md b/changes.md index c2b54534dc..0bceec7cb4 100644 --- a/changes.md +++ b/changes.md @@ -1,4 +1,4 @@ -## 1.10.739 +## 1.10.740 ### Changes * Removed REPL/target support for Rhino, Nashorn, Graaljs diff --git a/src/main/cljs/cljs/core.cljs b/src/main/cljs/cljs/core.cljs index 12ada0da52..520603cbd4 100644 --- a/src/main/cljs/cljs/core.cljs +++ b/src/main/cljs/cljs/core.cljs @@ -1208,7 +1208,7 @@ (defn js-iterable? "Return true if x has a JavaScript iterator property" [x] - (gobject/containsKey x ITER_SYMBOL)) + (not (nil? (js* "~{}[~{}]" x ITER_SYMBOL)))) (defn clone "Clone the supplied value which must implement ICloneable." diff --git a/src/test/cljs/cljs/seqs_test.cljs b/src/test/cljs/cljs/seqs_test.cljs index 2ecc71449e..2fc52c9053 100644 --- a/src/test/cljs/cljs/seqs_test.cljs +++ b/src/test/cljs/cljs/seqs_test.cljs @@ -231,3 +231,8 @@ (is (= () (rest s))) (is (nil? (next s))) (is (empty? s))))) + +(deftest test-js-iterable? + (testing "test that js-iterable? works on ES6 collections and normal values" + (is (true? (js-iterable? (js/Set.)))) + (is (false? (js-iterable? 1)))))