Skip to content

Commit

Permalink
fix older pharo versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Dec 27, 2023
1 parent daaf85e commit b156b53
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b156b53

Please sign in to comment.