X Tutup
Skip to content

Commit b156b53

Browse files
author
Johan Brichau
committed
fix older pharo versions
1 parent daaf85e commit b156b53

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineClass.superclass..st

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@ accessing-code
22
defineClass: aClassSymbol superclass: aSuperSymbol
33

44
| class |
5-
class := factory silentlyMake: [ :aBuilder |
6-
aBuilder
7-
superclass: (Smalltalk at: aSuperSymbol);
8-
package: self category ].
5+
class := SystemVersion current major >= 12
6+
ifTrue: [
7+
factory make: [ :aBuilder |
8+
aBuilder
9+
superclass: (Smalltalk at: aSuperSymbol);
10+
package: self category ] ]
11+
ifFalse: [
12+
factory
13+
newSubclassOf: (Smalltalk at: aSuperSymbol)
14+
instanceVariableNames: ''
15+
classVariableNames: 'classVarsString'
16+
category: self category ].
917
environment
1018
addClass: class;
1119
addClass: class theMetaClass.

0 commit comments

Comments
 (0)
X Tutup