Fix #1791: interop problem on Jsoup form element (#1792)

This commit is contained in:
Michiel Borkent 2025-01-23 14:10:36 +01:00 committed by GitHub
parent 8d3806a6e7
commit 7998e50045
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 3 deletions

View file

@ -8,7 +8,10 @@ A preview of the next release can be installed from
[Babashka](https://github.com/babashka/babashka): Native, fast starting Clojure interpreter for scripting
## Unreleased
- [#1785](https://github.com/babashka/babashka/issues/1785): Allow subclasses of `Throwable` to have instance methods invoked ([@bobisageek](https://github.com/bobisageek))
- [#1785](https://github.com/babashka/babashka/issues/1785): Allow subclasses of `Throwable` to have instance methods invoked ([@bobisageek](https://github.com/bobisageek))
- [#1791](https://github.com/babashka/babashka/issues/1791): interop problem on Jsoup form element
## 1.12.196 (2024-12-24)

View file

@ -804,6 +804,8 @@
java.util.Collection
(instance? java.lang.Throwable v)
java.lang.Throwable
(instance? org.jsoup.nodes.Element v)
org.jsoup.nodes.Element
;; keep commas for merge friendliness
)]
;; (prn :res res)

View file

@ -224,7 +224,7 @@
^"[Ljava.nio.file.LinkOption;"
(into-array LinkOption []))))))))
;; exercise a sampling of the superclass resolutions from the :public-class fn in
;; exercise a sampling of the superclass resolutions from the :public-class fn in
;; babashka.impl.classes/gen-class-map
(deftest public-class-resolutions
(testing "Charset"
@ -236,4 +236,6 @@
; compare output from ex-message to calling .getMessage
(let [return-throwable "(try (yaml/parse-string \"abc: def: ghi\") (catch Exception e e))"]
(is (= (bb nil (str "(ex-message " return-throwable ")"))
(bb nil (str "(.getMessage " return-throwable ")")))))))
(bb nil (str "(.getMessage " return-throwable ")"))))))
(testing "jsoup Element"
(is (= "form" (bb nil "(.tagName (first (.getElementsByTag (org.jsoup.Jsoup/parseBodyFragment \"<form></form>\") \"form\")))")))))