class: ProtoObject
authorClaus Gittinger <cg@exept.de>
Wed, 26 Feb 2014 10:51:35 +0100
changeset 16158 93042fc9827e
parent 16157 f4cb5106557f
child 16159 d66db46bd78f
class: ProtoObject changed: #ifNotNil:
ProtoObject.st
--- a/ProtoObject.st	Wed Feb 26 09:42:52 2014 +0100
+++ b/ProtoObject.st	Wed Feb 26 10:51:35 2014 +0100
@@ -48,7 +48,6 @@
 "
 ! !
 
-
 !ProtoObject methodsFor:'error handling'!
 
 doesNotUnderstand:aMessage
@@ -143,6 +142,9 @@
 !
 
 ifNotNil:aBlockOrValue
+    (aBlockOrValue isBlock and:[aBlockOrValue numArgs == 1]) ifTrue:[
+        ^ aBlockOrValue value:self.
+    ].
     ^ aBlockOrValue value
 !
 
@@ -184,9 +186,10 @@
 !ProtoObject class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ProtoObject.st,v 1.13 2009-12-01 19:59:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ProtoObject.st,v 1.14 2014-02-26 09:51:35 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ProtoObject.st,v 1.13 2009-12-01 19:59:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ProtoObject.st,v 1.14 2014-02-26 09:51:35 cg Exp $'
 ! !
+