diff options
author | Richard Newman <rnewman@twinql.com> | 2010-01-27 19:56:11 -0800 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2010-03-11 06:50:08 -0500 |
commit | b8d2892066d4eb4f472c155930941ad64d77da73 (patch) | |
tree | bfe4b16f7b76ecaf57ca6a8862117b0e143c9967 | |
parent | 237c1db2980be7d4336aa48e20c53517988f14b6 (diff) |
Correct behavior of clojure.set/rename-keys. Issue #145.
Signed-off-by: Rich Hickey <richhickey@gmail.com>
-rw-r--r-- | src/clj/clojure/set.clj | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/clj/clojure/set.clj b/src/clj/clojure/set.clj index e881ebe9..0cb4b49d 100644 --- a/src/clj/clojure/set.clj +++ b/src/clj/clojure/set.clj @@ -74,7 +74,8 @@ [map kmap] (reduce (fn [m [old new]] - (if (not= old new) + (if (and (not= old new) + (contains? m old)) (-> m (assoc new (m old)) (dissoc old)) m)) map kmap)) |