--- a/MessageSend.st Tue Feb 04 21:09:59 2014 +0100
+++ b/MessageSend.st Wed Apr 01 10:20:10 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
@@ -11,6 +13,8 @@
"
"{ Package: 'stx:libbasic' }"
+"{ NameSpace: Smalltalk }"
+
Message subclass:#MessageSend
instanceVariableNames:'receiver'
classVariableNames:''
@@ -160,6 +164,51 @@
"Modified: 20.3.1997 / 21:55:44 / cg"
! !
+!MessageSend methodsFor:'Compatibility-Squeak'!
+
+cull: optionalFirstArg
+ "activate the receiver with one or zero arguments.
+ Squeak compatibility, but also present in VW Smalltalk"
+
+ selector numArgs >= 1 ifTrue:[^ self value:optionalFirstArg].
+ ^ self value
+
+ "Modified: / 03-06-2014 / 12:40:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+cull: optionalFirstArg cull: optionalSecondArg
+ "activate the receiver with two or less arguments.
+ Squeak compatibility, but also present in VW Smalltalk"
+
+ | nargs |
+
+ nargs := selector numArgs.
+ nargs >= 2 ifTrue:[^ self value:optionalFirstArg value:optionalSecondArg].
+ nargs = 1 ifTrue:[^ self value:optionalFirstArg].
+ ^ self value
+
+ "Modified (format): / 03-06-2014 / 12:40:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+cull: firstArg cull: optionalSecondArg cull: optionalThirdArg
+ "activate the receiver with three or less arguments.
+ Squeak compatibility, but also present in VW Smalltalk"
+
+ | nargs |
+
+ nargs := selector numArgs.
+ nargs >= 2 ifTrue:[
+ nargs >= 3 ifTrue:[
+ ^ self value:firstArg value:optionalSecondArg value:optionalThirdArg
+ ].
+ ^ self value:firstArg value:optionalSecondArg
+ ].
+ nargs = 1 ifTrue:[^ self value:firstArg].
+ ^ self value
+
+ "Modified: / 03-06-2014 / 12:40:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!MessageSend methodsFor:'Compatibility-V''Age'!
evaluate
@@ -306,9 +355,10 @@
!MessageSend class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.24 2012-08-03 15:53:30 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.26 2015-03-27 11:21:29 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.24 2012-08-03 15:53:30 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.26 2015-03-27 11:21:29 cg Exp $'
! !
+