From 084cad966ea4b70382abcea11c74cefe9ce55ab5 Mon Sep 17 00:00:00 2001
From: Bronsa <brobronsa@gmail.com>
Date: Wed, 18 Apr 2012 17:20:44 +0200
Subject: [PATCH] fixed bugged -pop in PersistentVector

---
 src/cljs/cljs/core.cljs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/cljs/cljs/core.cljs b/src/cljs/cljs/core.cljs
index 43f9062..9134461 100644
--- a/src/cljs/cljs/core.cljs
+++ b/src/cljs/cljs/core.cljs
@@ -2183,9 +2183,10 @@ reduces them without incurring seq initialization"
      (zero? cnt) (throw (js/Error. "Can't pop empty vector"))
      (== 1 cnt) (-with-meta cljs.core.PersistentVector/EMPTY meta)
      (< 1 (- cnt (tail-off coll)))
-      (PersistentVector. meta (dec cnt) shift root (aclone tail))
-      :else (let [new-tail (array-for coll (- cnt 2))
+     (let [new-tail (aclone tail)]
+       (.splice new-tail -1 1)
+       (PersistentVector. meta (dec cnt) shift root new-tail))
+     :else (let [new-tail (array-for coll (- cnt 2))
                   nr (pop-tail shift root)
                   new-root (if (nil? nr) cljs.core.PersistentVector/EMPTY_NODE nr)
                   cnt-1 (dec cnt)]
-- 
1.7.9.1

