Skip to content

Commit

Permalink
Adding comment and verify:
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducasse committed Sep 13, 2024
1 parent c3060ad commit ef20263
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"
The origin in `sync=true&origin=Class>>#selector` should point to a method. A method either in the instance or class side.
I represent a wrong or badly defined origin specification so I represent that the
user specified something else than C [class]>>#selector
"
Class {
#name : 'MicBrokenSyncOriginDefinition',
#superclass : 'MicResult',
Expand Down
6 changes: 3 additions & 3 deletions src/Microdown-BookTester/MicSyncTesterStrategy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ MicSyncTesterStrategy >> verify: aCodeBlock [

splits := originString splitOn: '>>'.
( splits size = 2 )
ifFalse: [ self halt.self handleBrokenOrigin: originString of: aCodeBlock ]
ifFalse: [ self handleBrokenOrigin: originString of: aCodeBlock ]
ifTrue: [
| class |

Expand All @@ -65,14 +65,14 @@ MicSyncTesterStrategy >> verify: aCodeBlock [
isMeta := isMeta = 'class' ].
class := Smalltalk globals
at: className first asSymbol
ifAbsent: [ self halt. ^ self handleBrokenOrigin: originString of: aCodeBlock ].
ifAbsent: [ ^ self handleBrokenOrigin: originString of: aCodeBlock ].
isMeta
ifTrue: [ class := class class ].

class
compiledMethodAt: splits second trimBoth allButFirst asSymbol
ifPresent: [ :m | method := m ]
ifAbsent: [ self halt. ^ self
ifAbsent: [ ^ self
handleBrokenOrigin: originString
of: aCodeBlock ].

Expand Down

0 comments on commit ef20263

Please sign in to comment.