From e6f6b02c060ecaf3ad9818055100bd45d23b221b Mon Sep 17 00:00:00 2001 From: Crispin Wellington Date: Mon, 26 Sep 2022 16:52:59 +0800 Subject: [PATCH] Add single arg read method to PipedInputStream proxy (#1372) * reify java.lang.Object with optional toString and finalize * add single argument read method to PipedInputStream proxy * update changelog Co-authored-by: Michiel Borkent --- CHANGELOG.md | 2 +- src/babashka/impl/proxy.clj | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1dbdaac..5b6d8c11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ A preview of the next release can be installed from ## Unreleased -... +- Add single argument read method support to PipedInputStream proxy ([@retrogradeorbit](https://github.com/retrogradeorbit)) ## 0.10.163 (2022-09-24) diff --git a/src/babashka/impl/proxy.clj b/src/babashka/impl/proxy.clj index 707ba250..f40b7ab1 100644 --- a/src/babashka/impl/proxy.clj +++ b/src/babashka/impl/proxy.clj @@ -86,8 +86,10 @@ (read ([] ((method-or-bust methods 'read) this)) - ([b off len] - ((method-or-bust methods 'read) this b off len))) + ([bs] + ((method-or-bust methods 'read) this bs)) + ([bs off len] + ((method-or-bust methods 'read) this bs off len))) (receive [b] ((method-or-bust methods 'receive) this b))) ["java.io.PipedOutputStream" #{}]