Skip to content

Commit

Permalink
Fixing bugs linked to WeakChest's default instance and messages sent …
Browse files Browse the repository at this point in the history
…to wrong receiver in the API `inChest:at:put:`
  • Loading branch information
adri09070 committed Jan 23, 2023
1 parent ad2294b commit 9098a43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Chest/Chest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Chest class >> inChest: aChestName at: aKey put: anObject [
| chest |
[ chest := self named: aChestName ]
on: KeyNotFound
do: [ chest := self class newNamed: aChestName ].
do: [ chest := self newNamed: aChestName ].

^ chest at: aKey put: anObject
]
Expand Down
7 changes: 7 additions & 0 deletions Chest/WeakChest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Class {
#category : #Chest
}

{ #category : #accessing }
WeakChest class >> defaultInstance [

^ defaultInstance ifNil: [
defaultInstance := self newNamed: self defaultInstanceName ]
]

{ #category : #'default values' }
WeakChest class >> defaultInstanceName [

Expand Down

0 comments on commit 9098a43

Please sign in to comment.