summaryrefslogtreecommitdiff
path: root/src/clj
diff options
context:
space:
mode:
authorChristophe Grand <christophe@cgrand.net>2010-04-13 11:50:38 +0200
committerStuart Halloway <stu@thinkrelevance.com>2010-04-16 11:17:40 -0400
commitee9fc81dd2ef15d7ea3e17e7ec2370c5c09d633e (patch)
treefd493948d9e2d9c72b08a2baeda533a3ad71ed48 /src/clj
parenta2db3b5508cef22dcc5bcb7b386c17815ed83c6e (diff)
Check for identity before equality in .equals for collections, see #96
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
Diffstat (limited to 'src/clj')
-rw-r--r--src/clj/clojure/gvec.clj1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/clj/clojure/gvec.clj b/src/clj/clojure/gvec.clj
index a47959b0..2b1223ad 100644
--- a/src/clj/clojure/gvec.clj
+++ b/src/clj/clojure/gvec.clj
@@ -84,6 +84,7 @@
Object
(equals [this o]
(cond
+ (identical? this o) true
(or (instance? clojure.lang.IPersistentVector o) (instance? java.util.RandomAccess o))
(and (= cnt (count o))
(loop [i (int 0)]