--- a/UndefinedObject.st Tue Feb 04 21:09:59 2014 +0100
+++ b/UndefinedObject.st Wed Apr 01 10:20:10 2015 +0100
@@ -155,6 +155,8 @@
+
+
!UndefinedObject methodsFor:'converting'!
asBoolean
@@ -298,7 +300,6 @@
^ 0
! !
-
!UndefinedObject methodsFor:'subclass creation'!
nilSubclass:action
@@ -516,6 +517,17 @@
"Modified: / 19.5.1998 / 17:39:36 / cg"
!
+?+ aOneArgBlock
+ "a syntactic sugar-piece:
+ aOneArgBlock is executed with self as argument
+ if self is not nil.
+
+ Note: this method should never be redefined in classes other than UndefinedObject.
+ "
+
+ ^ self
+!
+
?? defaultValue
"a syntactic sugar-piece:
much like ?, but sends value to the argument if required.
@@ -564,7 +576,7 @@
It will vanish as soon as the conversion has been done"
- ^ ExternalStream openErrorSignal raise
+ ^ OpenError raise
!
hash
@@ -664,6 +676,16 @@
"Modified: / 13.11.2001 / 13:28:15 / cg"
!
+isNotNil
+ "Return true, if the receiver not nil.
+ Since I am definitely nil, unconditionally return false here.
+ the receiver is definitely not nil here, so unconditionally return false."
+
+ ^ false
+
+ "Created: / 26-10-2014 / 01:30:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
notEmptyOrNil
"Squeak compatibility:
return true if I am neither nil nor an empty collection."
@@ -694,18 +716,20 @@
!UndefinedObject methodsFor:'visiting'!
acceptVisitor:aVisitor with:aParameter
+ "dispatch for visitor pattern; send #visitNil:with: to aVisitor."
^ aVisitor visitNilWith:aParameter
! !
+
!UndefinedObject class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.74 2013-04-15 08:48:08 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.78 2014-10-26 01:31:37 vrany Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.74 2013-04-15 08:48:08 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.78 2014-10-26 01:31:37 vrany Exp $'
! !