forked from hiredman/clojure-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch for CLJ-940, marked for release in Clojure 1.5 but not yet …
…screened
- Loading branch information
1 parent
dc19623
commit 924c607
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
patches/clj-940-add-exception-for-non-sequence-in-refer-only-patch.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters