Permalink
Browse files

Add patch for CLJ-940, marked for release in Clojure 1.5 but not yet …

…screened
  • Loading branch information...
1 parent dc19623 commit 924c6072877be819c79a447674fbced1f1c2894d @jafingerhut committed Apr 27, 2012
Showing with 28 additions and 0 deletions.
  1. +27 −0 patches/clj-940-add-exception-for-non-sequence-in-refer-only-patch.txt
  2. +1 −0 patches/patch-order.txt
@@ -0,0 +1,27 @@
+From b488a86ea40d0260c575642b7cfd6589fef2c5c2 Mon Sep 17 00:00:00 2001
+From: Hugo Duncan <hugo@hugoduncan.org>
+Date: Fri, 24 Feb 2012 13:08:26 -0500
+Subject: [PATCH] Throw an informative exception when refer :only passed a non
+ sequence
+
+---
+ src/clj/clojure/core.clj | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj
+index 336be78..35a26e4 100644
+--- a/src/clj/clojure/core.clj
++++ b/src/clj/clojure/core.clj
+@@ -3768,6 +3768,9 @@
+ to-do (if (= :all (:refer fs))
+ (keys nspublics)
+ (or (:refer fs) (:only fs) (keys nspublics)))]
++ (when-not (instance? clojure.lang.IPersistentCollection to-do)
++ (throw (new Exception
++ ":only passed invalid value. Value should be a sequence of symbols")))
+ (doseq [sym to-do]
+ (when-not (exclude sym)
+ (let [v (nspublics sym)]
+--
+1.7.9.2
+
View
@@ -1,6 +1,7 @@
clj-730-0001-add-tests-for-complement-constantly-juxt-partial.patch
clj-962-subvec-nth-throws-on-negative-index-patch1.txt
clj-897-deftype-error-message-is-misleading-patch.txt
+clj-940-add-exception-for-non-sequence-in-refer-only-patch.txt
clj-967-improved-fix-for-ibm-jdks-patch2.txt
0001-CLJ-827-Add-bit-shift-right-logical.patch
0001-Fix-docstring-for-file-refs-196.patch

0 comments on commit 924c607

Please sign in to comment.