From 7f42a8eb1bc700cbece30255407fc99e62fb4b30 Mon Sep 17 00:00:00 2001 From: James Reeves Date: Sat, 24 Mar 2012 17:54:50 +0000 Subject: [PATCH] Renamed assoc+ to assoc-conj --- ring-core/src/ring/middleware/multipart_params.clj | 4 ++-- ring-core/src/ring/util/codec.clj | 2 +- ring-core/src/ring/util/data.clj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ring-core/src/ring/middleware/multipart_params.clj b/ring-core/src/ring/middleware/multipart_params.clj index 5b1ffec..e1034a0 100644 --- a/ring-core/src/ring/middleware/multipart_params.clj +++ b/ring-core/src/ring/middleware/multipart_params.clj @@ -1,6 +1,6 @@ (ns ring.middleware.multipart-params "Parse multipart upload into params." - (:use [ring.util.data :only (assoc+)]) + (:use [ring.util.data :only (assoc-conj)]) (:import [org.apache.commons.fileupload.util Streams] [org.apache.commons.fileupload RequestContext @@ -54,7 +54,7 @@ (->> (request-context request encoding) (file-item-seq) (map #(parse-file-item % store)) - (reduce (fn [m [k v]] (assoc+ m k v)) {}))) + (reduce (fn [m [k v]] (assoc-conj m k v)) {}))) (defn- load-var "Returns the var named by the supplied symbol, or nil if not found. Attempts diff --git a/ring-core/src/ring/util/codec.clj b/ring-core/src/ring/util/codec.clj index 8565492..3f03fee 100644 --- a/ring-core/src/ring/util/codec.clj +++ b/ring-core/src/ring/util/codec.clj @@ -107,7 +107,7 @@ (reduce (fn [m param] (if-let [[k v] (str/split param #"=" 2)] - (assoc+ m (form-decode-str k encoding) (form-decode-str v encoding)) + (assoc-conj m (form-decode-str k encoding) (form-decode-str v encoding)) m)) {} (str/split encoded #"&")))) diff --git a/ring-core/src/ring/util/data.clj b/ring-core/src/ring/util/data.clj index 9a2c473..7df7fda 100644 --- a/ring-core/src/ring/util/data.clj +++ b/ring-core/src/ring/util/data.clj @@ -1,7 +1,7 @@ (ns ring.util.data "Miscellaneous functions for manipulating data structures.") -(defn assoc+ +(defn assoc-conj "Associate a key with a value in a map. If the key already exists in the map, a vector of values is associated with the key." [map key val]