summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2009-03-18 01:22:47 +0000
committerRich Hickey <richhickey@gmail.com>2009-03-18 01:22:47 +0000
commitcb874e723057d22a3e711c179875edcda2ff3990 (patch)
tree9a79ba6b0553c50b588ebab6d5a0b85d76980a34 /src
parent05678fad1edc8a689aebdc21c71ee91c6210f32a (diff)
ancestors did not include the tag parents of a class' superclasses [issue 94], patch from cemerick
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 397ca177..f44fcb71 100644
--- a/src/clj/clojure/core.clj
+++ b/src/clj/clojure/core.clj
@@ -3343,7 +3343,10 @@
([h tag] (not-empty
(let [ta (get (:ancestors h) tag)]
(if (class? tag)
- (into (set (supers tag)) ta)
+ (let [superclasses (set (supers tag))]
+ (reduce into superclasses
+ (cons ta
+ (map #(get (:ancestors h) %) superclasses))))
ta)))))
(defn descendants