From a0ab746fc89dd51886a42901682ce11ae0727d6c Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Wed, 10 Sep 2014 03:11:45 +0900 Subject: [PATCH] fix #197 --- piclib/scheme/base.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/piclib/scheme/base.scm b/piclib/scheme/base.scm index 4ddabc80..28119e41 100644 --- a/piclib/scheme/base.scm +++ b/piclib/scheme/base.scm @@ -536,10 +536,9 @@ ;; 6.13. Input and output (define (call-with-port port proc) - (dynamic-wind - (lambda () #f) - (lambda () (proc port)) - (lambda () (close-port port)))) + (let ((value (proc port))) + (close-port port) + value)) (export current-input-port current-output-port