Skip to content

Commit

Permalink
Use Smalltalk>>#includesKey: to make it portable to Pharo8
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanecek committed Aug 28, 2024
1 parent 6239fec commit 350ae76
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions source/BaselineOfAnsible/BaselineOfAnsible.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,12 @@ BaselineOfAnsible >> baseline: spec [

{ #category : 'initialization' }
BaselineOfAnsible >> postLoadInitialization [

" ExpectedSocketFailure is used to handle socket failures across
different Pharo versions (SocketError was introduced in Pharo 11) "

Smalltalk
at: #ExpectedSocketFailure
put:
( Smalltalk
at: #SocketError
ifPresent: [ :socketError | socketError ]
ifAbsent: [ PrimitiveFailed ] )
Smalltalk at: #ExpectedSocketFailure put: ( ( Smalltalk includesKey: #SocketError )
then: [ Smalltalk at: #SocketError ]
otherwise: [ PrimitiveFailed ] )
]

{ #category : 'accessing' }
Expand Down

0 comments on commit 350ae76

Please sign in to comment.