Permalink
Browse files

CLJS-599: (= :a (keyword :a)) returned false

  • Loading branch information...
1 parent b81c96a commit efb3718a602a99f9fe36e518c64968b4a80f8ca2 @swannodette swannodette committed Sep 26, 2013
Showing with 2 additions and 1 deletion.
  1. +1 −1 src/cljs/cljs/core.cljs
  2. +1 −0 test/cljs/cljs/core_test.cljs
View
@@ -2056,7 +2056,7 @@ reduces them without incurring seq initialization"
"Returns a Keyword with the given namespace and name. Do not use :
in the keyword strings, it will be added automatically."
([name] (cond
- (keyword? name)(Keyword. nil name name nil)
+ (keyword? name) name
(symbol? name) (Keyword. nil (cljs.core/name name) (cljs.core/name name) nil)
:else (Keyword. nil name name nil)))
([ns name] (Keyword. ns name (str (when ns (str ns "/")) name) nil)))
@@ -230,6 +230,7 @@
(assert (= :a (keyword "a")))
(assert (= :a (keyword 'a)))
(assert (= :a/b (keyword 'a 'b)))
+ (assert (= :a (keyword :a)))
(assert (= {:a :b} (get {[1 2 3] {:a :b}, 4 5} [1 2 3])))
(assert (= :a (nth [:a :b :c :d] 0)))

0 comments on commit efb3718

Please sign in to comment.