diff --git a/src/babashka/impl/classes.clj b/src/babashka/impl/classes.clj index 96a114ea..f09b9e12 100644 --- a/src/babashka/impl/classes.clj +++ b/src/babashka/impl/classes.clj @@ -158,7 +158,9 @@ {:methods [{:name "getResource"} {:name "getResources"} {:name "getResourceAsStream"} - {:name "getParent"}]}}) + {:name "getParent"}]} + clojure.lang.ARef + {:methods [{:name "getWatches"}]}}) (def custom-map (cond-> diff --git a/test/babashka/main_test.clj b/test/babashka/main_test.clj index fe0adbd3..26b2e28a 100644 --- a/test/babashka/main_test.clj +++ b/test/babashka/main_test.clj @@ -843,6 +843,9 @@ true"))) (deftest index-of-test (is (= 1 (bb nil "(.indexOf (map inc [1 2 3]) 3)")))) +(deftest get-watches-test + (is (true? (bb nil "(map? (.getWatches (doto (atom nil) (add-watch :foo (fn [k r o n])))))" )))) + ;;;; Scratch (comment