Skip to content

Commit

Permalink
Add patch for CLJ-940, marked for release in Clojure 1.5 but not yet …
Browse files Browse the repository at this point in the history
…screened
  • Loading branch information
jafingerhut committed Apr 27, 2012
1 parent dc19623 commit 924c607
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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

1 change: 1 addition & 0 deletions patches/patch-order.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 924c607

Please sign in to comment.