summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Faulhaber <git_net@infolace.com>2010-06-19 23:45:48 -0700
committerStuart Halloway <stu@thinkrelevance.com>2010-06-23 17:06:59 -0400
commita1eff35124b923ef8539a35e7a292813ba54a0e0 (patch)
tree613038dc8bd46695d299b4822166d5d2c6d36dc4
parenta642708b6e9a1718b74248cc28a467bd53afc81f (diff)
Convert arg to a string before calling write (and document options arg)
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r--src/clj/clojure/core.clj4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj
index 5ad60614..fdfd37a8 100644
--- a/src/clj/clojure/core.clj
+++ b/src/clj/clojure/core.clj
@@ -5367,11 +5367,11 @@
(defn spit
"Opposite of slurp. Opens f with writer, writes content, then
- closes f."
+ closes f. Options passed to clojure.java.io/writer."
{:added "1.2"}
[f content & options]
(with-open [#^java.io.Writer w (apply jio/writer f options)]
- (.write w content)))
+ (.write w (str content))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; futures (needs proxy);;;;;;;;;;;;;;;;;;
(defn future-call