We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e531c34 commit f58dcdfCopy full SHA for f58dcdf
src/main/cljs/cljs/core.cljs
@@ -978,7 +978,7 @@
978
(if (symbol? name)
979
name
980
(let [idx (.indexOf name "/")]
981
- (if (== idx -1)
+ (if (< idx 1)
982
(symbol nil name)
983
(symbol (.substring name 0 idx)
984
(.substring name (inc idx) (. name -length)))))))
src/test/cljs/cljs/core_test.cljs
@@ -302,6 +302,11 @@
302
(testing "Testing symbol ctor is idempotent"
303
(is (= 'a (symbol 'a))))
304
305
+ (testing "Testing constructed division symbol"
306
+ (is (= '/ (symbol "/")))
307
+ (is (= (namespace '/) (namespace (symbol "/"))))
308
+ (is (= (hash '/) (hash (symbol "/")))))
309
+
310
(testing "Testing keyword ctor"
311
(is (= :a (keyword "a")))
312
(is (= :a (keyword 'a)))
0 commit comments