From b156b53c6f52a7d1122f92c74d4aadb6f59babfe Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Wed, 27 Dec 2023 22:21:39 +0100 Subject: [PATCH] fix older pharo versions --- .../instance/defineClass.superclass..st | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineClass.superclass..st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineClass.superclass..st index 463f801a..d5ecb9a8 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineClass.superclass..st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/defineClass.superclass..st @@ -2,10 +2,18 @@ accessing-code defineClass: aClassSymbol superclass: aSuperSymbol | class | - class := factory silentlyMake: [ :aBuilder | - aBuilder - superclass: (Smalltalk at: aSuperSymbol); - package: self category ]. + class := SystemVersion current major >= 12 + ifTrue: [ + factory make: [ :aBuilder | + aBuilder + superclass: (Smalltalk at: aSuperSymbol); + package: self category ] ] + ifFalse: [ + factory + newSubclassOf: (Smalltalk at: aSuperSymbol) + instanceVariableNames: '' + classVariableNames: 'classVarsString' + category: self category ]. environment addClass: class; addClass: class theMetaClass.