~ chicken-core (chicken-5) dc41668ccaf71b37f9a3da908d60863faf85c97f


commit dc41668ccaf71b37f9a3da908d60863faf85c97f
Author:     Christian Kellermann <ckeen@pestilenz.org>
AuthorDate: Tue Mar 6 12:31:40 2012 +0100
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Tue Mar 6 13:01:15 2012 +0100

    Check assert's msg argument for being a string.
    
    Signed-off-by: felix <felix@call-with-current-continuation.org>

diff --git a/chicken-syntax.scm b/chicken-syntax.scm
index bed542ec..71576b2d 100644
--- a/chicken-syntax.scm
+++ b/chicken-syntax.scm
@@ -175,8 +175,10 @@
 	     (ln (get-line-number form))
 	     (msg-and-args (cddr form))
 	     (msg  (if (null? msg-and-args)
-		       "assertion failed"
-		       (car msg-and-args)))
+                       "assertion failed"
+                       (let ((msg-str (car msg-and-args)))
+                         (##sys#check-string msg-str 'assert)
+                         msg-str)))
 	     (msg (if ln
 		      (string-append "(" ln ") " msg)
 		      msg)))
Trap