[CLJS-162] cljs.core/str behavior not consistent with clojure Created: 15/Mar/12 Updated: 19/Mar/12 Resolved: 19/Mar/12
This is the behavior on rhino repl, haven't tested on browser
|Attachments:||CLJS-162_1.patch CLJS-162_2.patch CLJS-162.patch|
When running the cljs.core/str function with symbols or keywords the output is not the same as in clojure
ClojureScript:cljs.user> (str "hello" :world)
The same happens with symbols, it seems the characters used internally for figuring out if a string is a keyword or symbol are not being escaped correctly on the cljs.core/str function.
|Comment by Roman Gonzalez [ 15/Mar/12 9:18 PM ]|
Added check of symbols and keywords on the private cljs.core/str* function
|Comment by David Nolen [ 16/Mar/12 11:57 AM ]|
The patch looks good but some tests fail now. Can you address that? Thanks!
|Comment by Roman Gonzalez [ 16/Mar/12 11:55 PM ]|
Thanks for checking this out David, I didn't read the developer wiki (my bad), I added a few tests and added a new small function that will allow both str* and str to behave correctly, cheers.
|Comment by Roman Gonzalez [ 19/Mar/12 5:45 PM ]|
New patch which just replicates the StringBuffer code from `str*` into the `str` implementation.
|Comment by David Nolen [ 19/Mar/12 9:25 PM ]|