summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2009-02-11 00:42:29 +0000
committerRich Hickey <richhickey@gmail.com>2009-02-11 00:42:29 +0000
commitbe3d2c8c8702d76bdb091a9f2c17c293f3eceb5d (patch)
treebd2e4ae64b6f216fa898754e6a56982ab7b290ff
parent3d30e8c97631bdf5c7527cfac358d78addd7790a (diff)
IDeref print method honors *print-level*, patch from Chouser
-rw-r--r--src/clj/clojure/core_print.clj9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/clj/clojure/core_print.clj b/src/clj/clojure/core_print.clj
index 7cf92a33..999bcf8c 100644
--- a/src/clj/clojure/core_print.clj
+++ b/src/clj/clojure/core_print.clj
@@ -302,10 +302,9 @@
(.write w ")"))
(defmethod print-method clojure.lang.IDeref [o #^Writer w]
- (.write w (format "#<%s@%x: "
- (.getSimpleName (class o))
- (System/identityHashCode o)))
- (print-method @o w)
- (.write w ">"))
+ (print-sequential (format "#<%s@%x: "
+ (.getSimpleName (class o))
+ (System/identityHashCode o))
+ pr-on, "", ">", (list @o), w))
(def #^{:private true} print-initialized true)