Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Clojure's set and keys fns when in ClojureScript, rather than Jav…

…a-specific #keySet method.
  • Loading branch information...
commit cdeea55f211f1dbe4768c8aec3149bfcb00438a2 1 parent 2085bf1
@lynaghk lynaghk authored David Nolen committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main/clojure/clojure/core/match.clj
View
4 src/main/clojure/clojure/core/match.clj
@@ -1051,7 +1051,9 @@
(if only
(let [a (with-meta (gensym) {:tag 'java.util.Map})]
(cons (guard-pattern (wildcard-pattern)
- (set [`(fn [~a] (= (.keySet ~a) #{~@only}))]))
+ (set [(if *clojurescript*
+ `(fn [~a] (= (set (keys ~a)) #{~@only}))
+ `(fn [~a] (= (.keySet ~a) #{~@only})))]))
ps))
(cons (wildcard-pattern) ps))
ps)]
Please sign in to comment.
Something went wrong with that request. Please try again.