diff options
author | Rich Hickey <richhickey@gmail.com> | 2009-02-09 16:42:02 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2009-02-09 16:42:02 +0000 |
commit | f068df679522b5a21417db669a17f8bda4bb337e (patch) | |
tree | 6f08b9b4130cd421b4b5ddcba98e90273cf030b9 | |
parent | f1daffdbae886dab563f5653ffd78db40403115c (diff) |
improved ref printing, patch from Chouser
-rw-r--r-- | src/clj/clojure/core_print.clj | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/clj/clojure/core_print.clj b/src/clj/clojure/core_print.clj index 7a79a903..7cf92a33 100644 --- a/src/clj/clojure/core_print.clj +++ b/src/clj/clojure/core_print.clj @@ -301,4 +301,11 @@ (print-dup (.name n) w) (.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 ">")) + (def #^{:private true} print-initialized true) |