~ chicken-core (chicken-5) 1d9b585414e6f6e67bb996782821ef84a581571f


commit 1d9b585414e6f6e67bb996782821ef84a581571f
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Sat Dec 21 20:19:42 2013 +1300
Commit:     Peter Bex <peter.bex@xs4all.nl>
CommitDate: Tue Dec 24 19:02:04 2013 +0100

    Fix argument error on incomplete here document tag due to (string-length #!eof)
    
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>

diff --git a/library.scm b/library.scm
index fe545394..7ff334dc 100644
--- a/library.scm
+++ b/library.scm
@@ -4577,8 +4577,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))
@@ -4612,8 +4611,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) )
Trap