Browse files

Fix clojure-code? predicate for NO_SOURCE_FILE repl functions.

  • Loading branch information...
1 parent 9c37625 commit 2fe5526db2ff3bd1273861afe8ebfdb92e052f5b @technomancy technomancy committed Oct 9, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/clj_stacktrace/core.clj
@@ -5,6 +5,7 @@
"Returns true if the filename is non-null and indicates a clj source file."
[class-name file]
(or (utils/re-match? #"^user" class-name)
+ (= file "NO_SOURCE_FILE")
(and file (utils/re-match? #"\.clj$" file))))
(defn- clojure-ns
@@ -59,7 +60,7 @@
(let [class-name (.getClassName elem)
file (.getFileName elem)
- line (let [l (.getLineNumber elem)] (if (> l 0) l))
+ line (let [l (.getLineNumber elem)] (if (pos? l) l))
parsed {:file file :line line}]
(if (clojure-code? class-name file)
(assoc parsed

0 comments on commit 2fe5526

Please sign in to comment.