Add RT iter to babashka (#1781)
This commit is contained in:
parent
1874da1d2d
commit
b16ecfdf6c
3 changed files with 54 additions and 43 deletions
|
|
@ -9,6 +9,9 @@ A preview of the next release can be installed from
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- [#1761] For compatibility with [Sieppari](https://github.com/metosin/sieppari), added the following entry in `babashka.impl.classes/classes`:
|
||||||
|
- Support `support clojure.lang.RT/iter` calls
|
||||||
|
|
||||||
- [#1760] For compatibility with [Fireworks v0.10.3](https://github.com/paintparty/fireworks), added the following to `:instance-checks` entry in `babashka.impl.classes/classes`([@paintparty](https://github.com/paintparty))
|
- [#1760] For compatibility with [Fireworks v0.10.3](https://github.com/paintparty/fireworks), added the following to `:instance-checks` entry in `babashka.impl.classes/classes`([@paintparty](https://github.com/paintparty))
|
||||||
- `clojure.lang.PersistentArrayMap$TransientArrayMap`
|
- `clojure.lang.PersistentArrayMap$TransientArrayMap`
|
||||||
- `clojure.lang.PersistentHashMap$TransientHashMap`
|
- `clojure.lang.PersistentHashMap$TransientHashMap`
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,7 @@
|
||||||
{:methods [{:name "aget"}
|
{:methods [{:name "aget"}
|
||||||
{:name "aset"}
|
{:name "aset"}
|
||||||
{:name "aclone"}
|
{:name "aclone"}
|
||||||
|
{:name "iter"}
|
||||||
;; we expose this via the Compiler/LOADER dynamic var
|
;; we expose this via the Compiler/LOADER dynamic var
|
||||||
{:name "baseLoader"}]}
|
{:name "baseLoader"}]}
|
||||||
clojure.lang.Compiler
|
clojure.lang.Compiler
|
||||||
|
|
|
||||||
|
|
@ -186,3 +186,10 @@
|
||||||
(let [kp (keypair)
|
(let [kp (keypair)
|
||||||
pk (.getPublic kp)]
|
pk (.getPublic kp)]
|
||||||
(bytes? (.getEncoded pk))))))))
|
(bytes? (.getEncoded pk))))))))
|
||||||
|
|
||||||
|
;; RT iter test
|
||||||
|
(deftest clojure-RT-iter-test
|
||||||
|
(is (= (iterator-seq (.iterator [1 2 3]))
|
||||||
|
(bb nil '(do (ns test
|
||||||
|
(:import [clojure.lang RT]))
|
||||||
|
(iterator-seq (clojure.lang.RT/iter [1 2 3])))))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue