>From 93267fb17d4d61712517b93f9b0843719e74ba2a Mon Sep 17 00:00:00 2001 From: Alaric Snell-Pym Date: Mon, 12 Mar 2012 16:37:29 +0000 Subject: [PATCH] Rather than requiring assert's message to statically be a string, instead allow it to be an expression that evaluates (at assertion failure time) to something that can be turned into a string. No documentation changes were required, as I believe this is the behaviour implied by the documentation to begin with... --- chicken-syntax.scm | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/chicken-syntax.scm b/chicken-syntax.scm index 71576b2..4683a74 100644 --- a/chicken-syntax.scm +++ b/chicken-syntax.scm @@ -176,11 +176,9 @@ (msg-and-args (cddr form)) (msg (if (null? msg-and-args) "assertion failed" - (let ((msg-str (car msg-and-args))) - (##sys#check-string msg-str 'assert) - msg-str))) + (car msg-and-args))) (msg (if ln - (string-append "(" ln ") " msg) + `(,(r 'string-append) ,(string-append "(" ln ") ") ,msg) msg))) `(##core#if (##core#check ,exp) (##core#undefined) -- 1.7.4.1