From f6d4a36266e3731db551f03d1c9867c8dd3b2206 Mon Sep 17 00:00:00 2001 From: Joana Bergsiek Date: Wed, 10 Jan 2024 16:21:26 +0100 Subject: [PATCH] Slight refactoring --- packages/Sandblocks-Smalltalk/SBVariantProxy.class.st | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/Sandblocks-Smalltalk/SBVariantProxy.class.st b/packages/Sandblocks-Smalltalk/SBVariantProxy.class.st index 15bbc6f4..6c12054e 100644 --- a/packages/Sandblocks-Smalltalk/SBVariantProxy.class.st +++ b/packages/Sandblocks-Smalltalk/SBVariantProxy.class.st @@ -98,10 +98,10 @@ SBVariantProxy >> updateOriginalWithOwnValues [ | variantThatNeedsChanging | variantThatNeedsChanging := self containedMethod detectVariant: original. - variantThatNeedsChanging ifNil: [self delete. ^ self]. + variantThatNeedsChanging ifNil: [^self delete]. original replaceBy: (original := self firstSubmorph copyBlock). - original isVariant ifFalse: [self delete. ^ self]. + original isVariant ifFalse: [^ self delete]. variantThatNeedsChanging replaceValuesFrom: original copyBlock. self sandblockEditor markChanged: self containedMethod @@ -112,8 +112,9 @@ SBVariantProxy >> updateSelfAfterMethodUpdate: newMethod [ | variantThatMaybeChanged | variantThatMaybeChanged := newMethod detectVariant: original. + containedMethod := newMethod. - variantThatMaybeChanged ifNil: [self delete. ^ self]. + variantThatMaybeChanged ifNil: [^self delete]. (variantThatMaybeChanged sourceString ~= self firstSubmorph sourceString) ifTrue: [