summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStuart Halloway <stu@thinkrelevance.com>2010-12-17 10:57:47 -0500
committerStuart Halloway <stu@thinkrelevance.com>2010-12-17 17:08:46 -0500
commit2853173b2632e87772f932f9aa80206004db5f83 (patch)
tree10f9b12bc275feef6b0c0325b34878aa09fe11dc /src
parentafe9d402684f8a8a675b90591621387bb55c0fd4 (diff)
cache newline system property in a private var #300
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
Diffstat (limited to 'src')
-rw-r--r--src/clj/clojure/core.clj5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj
index a9e45d92..bd4c05d3 100644
--- a/src/clj/clojure/core.clj
+++ b/src/clj/clojure/core.clj
@@ -3206,12 +3206,15 @@
(recur (first more) nmore)
(apply pr more))))
+(def ^:private ^String system-newline
+ (System/getProperty "line.separator"))
+
(defn newline
"Writes a platform-specific newline to *out*"
{:added "1.0"
:static true}
[]
- (. *out* (append (System/getProperty "line.separator")))
+ (. *out* (append system-newline))
nil)
(defn flush