Skip to content

Commit 9098a43

Browse files
committed
Fixing bugs linked to WeakChest's default instance and messages sent to wrong receiver in the API inChest:at:put:
1 parent ad2294b commit 9098a43

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Chest/Chest.class.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Chest class >> inChest: aChestName at: aKey put: anObject [
234234
| chest |
235235
[ chest := self named: aChestName ]
236236
on: KeyNotFound
237-
do: [ chest := self class newNamed: aChestName ].
237+
do: [ chest := self newNamed: aChestName ].
238238

239239
^ chest at: aKey put: anObject
240240
]

Chest/WeakChest.class.st

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ Class {
77
#category : #Chest
88
}
99

10+
{ #category : #accessing }
11+
WeakChest class >> defaultInstance [
12+
13+
^ defaultInstance ifNil: [
14+
defaultInstance := self newNamed: self defaultInstanceName ]
15+
]
16+
1017
{ #category : #'default values' }
1118
WeakChest class >> defaultInstanceName [
1219

0 commit comments

Comments
 (0)