>From 957253ac1f796d6ed2a745f006083c64ebec9c50 Mon Sep 17 00:00:00 2001 From: Evan Hanson Date: Sat, 21 Dec 2013 20:19:42 +1300 Subject: [PATCH] Fix argument error on incomplete here document tag due to (string-length #!eof) --- library.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/library.scm b/library.scm index c14d069..6faff95 100644 --- a/library.scm +++ b/library.scm @@ -4575,8 +4575,7 @@ EOF (let ([ln (open-output-string)]) (do ([c (##sys#read-char-0 port) (##sys#read-char-0 port)]) ((or (eof-object? c) (char=? #\newline c)) - (cond [(char? c) (get-output-string ln)] - [else c] ) ) + (get-output-string ln)) (##sys#write-char-0 c ln) ) ) ) (define (read-escaped-sexp port skip-brace?) (when skip-brace? (##sys#read-char-0 port)) @@ -4610,8 +4609,8 @@ EOF port "Whitespace after #<< here-doc tag")) )) (do ([ln (readln port) (readln port)]) - ((or (eof-object? ln) (string=? end ln)) - (when (eof-object? ln) + ((or (string=? "" ln) (string=? end ln)) + (when (string=? "" ln) (##sys#read-warning port (##sys#format-here-doc-warning end))) (get-output-string str) ) -- 1.7.10.4