Permalink
Browse files

Fix typo—:annon → :anon.

  • Loading branch information...
1 parent 2116d89 commit 0c424a5bdd358980f48ef9bdaa874c5d362523b6 @technomancy technomancy committed Oct 9, 2011
Showing with 15 additions and 15 deletions.
  1. +5 −5 src/clj_stacktrace/core.clj
  2. +1 −1 src/clj_stacktrace/repl.clj
  3. +9 −9 test/clj_stacktrace/core_test.clj
@@ -39,7 +39,7 @@
class-name
clojure-fn-subs))
-(defn- clojure-annon-fn?
+(defn- clojure-anon-fn?
"Returns true if the bytecode class name implies an anonymous inner fn."
[class-name]
(utils/re-match? #"\$.*\$" class-name))
@@ -56,7 +56,7 @@
:clojure true, to inidcate a Clojure elem.
:ns String representing the namespace of the function.
:fn String representing the name of the enclosing var for the function.
- :annon-fn true iff the function is an anonymous inner fn."
+ :anon-fn true iff the function is an anonymous inner fn."
[elem]
(let [class-name (.getClassName elem)
file (.getFileName elem)
@@ -65,9 +65,9 @@
(if (clojure-code? class-name file)
(assoc parsed
:clojure true
- :ns (clojure-ns class-name)
- :fn (clojure-fn class-name)
- :annon-fn (clojure-annon-fn? class-name))
+ :ns (clojure-ns class-name)
+ :fn (clojure-fn class-name)
+ :anon-fn (clojure-anon-fn? class-name))
(assoc parsed
:java true
:class class-name
@@ -39,7 +39,7 @@
"(Unknown Source)"))
(defn clojure-method-str [parsed]
- (str (:ns parsed) "/" (:fn parsed) (if (:annon-fn parsed) "[fn]")))
+ (str (:ns parsed) "/" (:fn parsed) (if (:anon-fn parsed) "[fn]")))
(defn java-method-str [parsed]
(str (:class parsed) "." (:method parsed)))
@@ -6,39 +6,39 @@
(def cases
[["foo.bar$biz__123" "invoke" "bar.clj" 456
{:clojure true :ns "foo.bar" :fn "biz"
- :file "bar.clj" :line 456 :annon-fn false}]
+ :file "bar.clj" :line 456 :anon-fn false}]
["foo.bar$biz_bat__123" "invoke" "bar.clj" 456
{:clojure true :ns "foo.bar" :fn "biz-bat"
- :file "bar.clj" :line 456 :annon-fn false}]
+ :file "bar.clj" :line 456 :anon-fn false}]
["foo.bar$biz_bat_QMARK___448" "invoke" "bar.clj" 456
{:clojure true :ns "foo.bar" :fn "biz-bat?"
- :file "bar.clj" :line 456 :annon-fn false}]
+ :file "bar.clj" :line 456 :anon-fn false}]
["foo.bar$biz_bat_QMARK___448$fn__456" "invoke" "bar.clj" 456
{:clojure true :ns "foo.bar" :fn "biz-bat?"
- :file "bar.clj" :line 456 :annon-fn true}]
+ :file "bar.clj" :line 456 :anon-fn true}]
["foo.bar$repl$fn__5629.invoke" "invoke" "bar.clj" 456
{:clojure true :ns "foo.bar" :fn "repl"
- :file "bar.clj" :line 456 :annon-fn true}]
+ :file "bar.clj" :line 456 :anon-fn true}]
["foo.bar$repl$read_eval_print__5624" "invoke" "bar.clj" 456
{:clojure true :ns "foo.bar" :fn "repl"
- :file "bar.clj" :line 456 :annon-fn true}]
+ :file "bar.clj" :line 456 :anon-fn true}]
["foo.bar$biz__123$fn__456" "invoke" "bar.clj" 789
{:clojure true :ns "foo.bar" :fn "biz"
- :file "bar.clj" :line 789 :annon-fn true}]
+ :file "bar.clj" :line 789 :anon-fn true}]
["foo.bar_bat$biz__123" "invoke" "bar.clj" 456
{:clojure true :ns "foo.bar-bat" :fn "biz"
- :file "bar.clj" :line 456 :annon-fn false}]
+ :file "bar.clj" :line 456 :anon-fn false}]
["user$eval__345" "invoke" nil -1
{:clojure true :ns "user" :fn "eval"
- :file nil :line nil :annon-fn false}]
+ :file nil :line nil :anon-fn false}]
["clojure.lang.Var" "invoke" "Var.java" 123
{:java true :class "clojure.lang.Var" :method "invoke"

0 comments on commit 0c424a5

Please sign in to comment.