--- a/Behavior.st Wed Oct 26 23:35:39 2016 +0100
+++ b/Behavior.st Fri Nov 18 20:48:04 2016 +0000
@@ -1332,6 +1332,8 @@
!
theNonMetaClass
+ <resource: #obsolete>
+
"alias for theNonMetaclass (Squeak) - return the class.
sigh; in ST/X, it is called theNonMetaclass; please use that."
@@ -1422,7 +1424,6 @@
^ self nameWithoutPrefix
! !
-
!Behavior methodsFor:'RefactoringBrowser'!
realClass
@@ -1440,30 +1441,30 @@
|oldMethod ns nsName selector newLookupObject|
(newSelector isMemberOf:Symbol) ifFalse:[
- self error:'invalid selector'.
+ self error:'invalid selector'.
].
ns := newMethod nameSpace.
(ns notNil and:[(nsName := ns name) ~= self programmingLanguage defaultSelectorNameSpacePrefix]) ifTrue:[
- selector := (':' , nsName , '::' , newSelector) asSymbol.
- newLookupObject := Smalltalk at: #NamespaceAwareLookup. "/ so it can be nilled to disable that feature
+ selector := (':' , nsName , '::' , newSelector) asSymbol.
+ newLookupObject := Smalltalk at: #NamespaceAwareLookup. "/ so it can be nilled to disable that feature
] ifFalse:[
- selector := newSelector
+ selector := newSelector
].
"/ Q (cg): isn't that something that the caller should decide?
oldMethod := self compiledMethodAt:selector.
oldMethod notNil ifTrue:[
- newMethod restricted:(oldMethod isRestricted).
- newMethod setPrivacy:(oldMethod privacy) flushCaches:false.
+ newMethod restricted:(oldMethod isRestricted).
+ newMethod setPrivacy:(oldMethod privacy) flushCaches:false.
].
(self primAddSelector:selector withMethod:newMethod) ifFalse:[^ false].
newLookupObject notNil ifTrue:[
- lookupObject ~= newLookupObject ifTrue:[
- self lookupObject: newLookupObject
- ]
+ lookupObject ~= newLookupObject ifTrue:[
+ self lookupObject: newLookupObject
+ ]
].
"
@@ -1473,12 +1474,12 @@
"
"
problem: this is slower; since looking for all subclasses is (currently)
- a bit slow :-(
- We need the hasSubclasses-info bit in Behavior; now
+ a bit slow :-(
+ We need the hasSubclasses-info bit in Behavior; now
self withAllSubclassesDo:[:aClass |
- ObjectMemory flushInlineCachesFor:aClass withArgs:nargs.
- ObjectMemory flushMethodCacheFor:aClass
+ ObjectMemory flushInlineCachesFor:aClass withArgs:nargs.
+ ObjectMemory flushMethodCacheFor:aClass
].
"
@@ -1733,7 +1734,7 @@
!Behavior methodsFor:'cleanup'!
flushSubclasses
- "I dont keep my subclasses - but if anyone inherits from me,
+ "I don't keep my subclasses - but if anyone inherits from me,
it better knows how to ignore this"
!
@@ -2524,7 +2525,7 @@
Operatingsystem, which was not kind enough to give it.
Bad luck - you should increase the swap space on your machine.
"
- ^ ObjectMemory allocationFailureSignal raise.
+ ^ AllocationFailure raise.
!
basicNew:anInteger
@@ -2890,7 +2891,7 @@
Operatingsystem, which was not kind enough to give it.
Bad luck - you should increase the swap space on your machine.
"
- ^ ObjectMemory allocationFailureSignal raise.
+ ^ AllocationFailure raise.
!
decodeFromLiteralArray:anArray
@@ -3617,7 +3618,7 @@
nameWithArticle
"return a string consisting of classname preceeded by an article.
- (dont expect me to write national variants for this ... :-)
+ (don't expect me to write national variants for this ... :-)
If you have special preferences, redefine it..."
|classname|
@@ -4783,14 +4784,14 @@
This is semantically equivalent to includesSelector: (which is ST/80/Squeak compatibility).
Caveat:
- This simply checks for the selector being present in the classes
- selector table - therefore, it does not care for ignoredMethods.
- (but: you should not use this method for protocol-testing, anyway).
+ This simply checks for the selector being present in the classes
+ selector table - therefore, it does not care for ignoredMethods.
+ (but: you should not use this method for protocol-testing, anyway).
Hint:
- Dont use this method to check if someone responds to a message -
- use #canUnderstand: on the class or #respondsTo: on the instance
- to do this."
+ Don't use this method to check if someone responds to a message -
+ use #canUnderstand: on the class or #respondsTo: on the instance
+ to do this."
^ self includesSelector:aSelector