civodul pushed a commit to branch main
in repository guile.

commit fb1f5e28b1a575247fd16184b1c83b8838b09716
Author: Jonas Hahnfeld <hah...@hahnjo.de>
AuthorDate: Tue Oct 24 19:24:22 2023 +0200

    Match on correct argument in make-custom-port
    
    * module/ice-9/custom-ports.scm (make-custom-port): Match on correct
    argument for conversion strategy.
    * NEWS: Update.
    
    Signed-off-by: Ludovic Courtès <l...@gnu.org>
---
 NEWS                          | 1 +
 module/ice-9/custom-ports.scm | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index d9068e07b..8ed39ceb9 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,7 @@ the compiler reports it as "possibly unused".
    (<https://bugs.gnu.org/62690>)
 ** 'ftw' now correctly deals with directory permissions
    (<https://bugs.gnu.org/55344>)
+** 'make-custom-port' now honors its #:conversion-strategy argument
 ** Hashing of UTF-8 symbols with non-ASCII characters avoids corruption
    (<https://bugs.gnu.org/56413>)
 
diff --git a/module/ice-9/custom-ports.scm b/module/ice-9/custom-ports.scm
index 07b6ba28a..6010fd94f 100644
--- a/module/ice-9/custom-ports.scm
+++ b/module/ice-9/custom-ports.scm
@@ -146,7 +146,7 @@ methods."
       ((? symbol?)
        (string->symbol (string-upcase (symbol->string encoding))))))
   (define (canonicalize-conversion-strategy conversion-strategy)
-    (match encoding
+    (match conversion-strategy
       ('escape 'escape)
       ('substitute 'substitute)
       (_ 'error)))

Reply via email to