diff options
| author | Stuart Halloway <stu@thinkrelevance.com> | 2010-12-17 10:57:47 -0500 |
|---|---|---|
| committer | Stuart Halloway <stu@thinkrelevance.com> | 2010-12-17 17:08:46 -0500 |
| commit | 2853173b2632e87772f932f9aa80206004db5f83 (patch) | |
| tree | 10f9b12bc275feef6b0c0325b34878aa09fe11dc /src | |
| parent | afe9d402684f8a8a675b90591621387bb55c0fd4 (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.clj | 5 |
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 |
