*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 06 Apr 2009 15:11:53 +0200
changeset 11662 08309a406658
parent 11661 354ccb7cd5cd
child 11663 6ef3b25bd306
*** empty log message ***
Object.st
--- a/Object.st	Fri Apr 03 18:12:50 2009 +0200
+++ b/Object.st	Mon Apr 06 15:11:53 2009 +0200
@@ -2672,15 +2672,23 @@
 assert:aBooleanOrBlock
     "fail, if the argument does not evaluate to true and report an error"
 
+    "{ Pragma: +optSpace }"
+
     <resource: #skipInDebuggersWalkBack>
 
     aBooleanOrBlock == true ifTrue:[^ self].
     (Smalltalk at:#IgnoreAssertion ifAbsent:false) == true ifTrue:[^ self].
 
     "/ could still be a block or false.
-    self
-	assert:aBooleanOrBlock
-	message:('Assertion failed in ' , thisContext sender printString)
+    (aBooleanOrBlock value) ifFalse:[
+        AssertionFailedError 
+            raiseRequestWith:self 
+            errorString:('Assertion failed', ' { ',thisContext sender printString,' }')
+    ].
+
+    "
+     self assert:false
+    "
 !
 
 assert:aBooleanOrBlock message:messageIfFailing
@@ -2694,11 +2702,13 @@
     (Smalltalk at:#IgnoreAssertion ifAbsent:false) == true ifTrue:[^ self].
 
     (aBooleanOrBlock value) ifFalse:[
-	AssertionFailedError raiseRequestWith:self errorString:messageIfFailing
-    ].
-
-    "
-     self assert:false
+        AssertionFailedError 
+            raiseRequestWith:self 
+            errorString:(messageIfFailing, ' {',thisContext sender printString,' }')
+    ].
+
+    "
+     self assert:false message:'xxx'
     "
 !
 
@@ -9214,7 +9224,7 @@
 !Object class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.628 2009-03-17 15:59:58 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.629 2009-04-06 13:11:53 cg Exp $'
 ! !
 
 Object initialize!