X Tutup
Skip to content

Commit 4abf403

Browse files
author
Johan Brichau
committed
#defaultValue should not be called from within #use:during:
1 parent 9eaee5b commit 4abf403

File tree

4 files changed

+37
-39
lines changed

4 files changed

+37
-39
lines changed
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
accessing
22
use: anObject during: aBlock
3-
4-
| p oldValue result |
5-
"Proper implementation instead of use 'super value:during:' because that one does not return value, perhaps this should be fixed in DynamicVariable?"
6-
p := Processor activeProcess.
7-
oldValue := p environmentAt: self ifAbsent: [self default].
8-
[
9-
p environmentAt: self put: anObject.
10-
result := aBlock value.
11-
] ensure: [
12-
p environmentAt: self put: oldValue
13-
].
14-
^ result
3+
| p oldValue result |
4+
"Proper implementation instead of use 'super value:during:' because that one does not return value, perhaps this should be fixed in DynamicVariable?"
5+
p := Processor activeProcess.
6+
oldValue := p environmentAt: self.
7+
[
8+
p environmentAt: self put: anObject.
9+
result := aBlock value ]
10+
ensure: [ p environmentAt: self put: oldValue ].
11+
^ result
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"class" : {
3-
"use:during:" : "JohanBrichau 05/25/2017 08:13" },
3+
"use:during:" : "JohanBrichau 07/23/2017 07:39" },
44
"instance" : {
55
} }

repository/Grease-GemStone-Core.package/monticello.meta/version

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
{
2-
"class" : {
3-
},
42
"instance" : {
5-
"allowsDuplicateValues" : "jf 2/6/2010 04:22",
3+
"testAsUppercase" : "jf 9/25/2009 16:50",
64
"arbitraryCollection" : "jok 2/9/2010 13:19",
5+
"testTruncate" : "lr 2/7/2008 09:32",
6+
"testCapitalized" : "pmm 9/1/2012 15:24",
7+
"includedElement" : "jf 2/6/2010 02:44",
8+
"testTruncateEmpty" : "lr 2/7/2008 09:32",
9+
"testInflectorNotInflecting" : "mlucas-smith 6/3/2009 22:33",
710
"collectionClass" : "jf 2/6/2010 01:50",
11+
"testInflectorTsssSuffixes" : "lr 2/7/2008 09:11",
812
"duplicateElement" : "jf 2/6/2010 02:44",
9-
"excludedElement" : "jf 2/6/2010 02:20",
10-
"includedElement" : "jf 2/6/2010 02:44",
11-
"isExtensible" : "jf 2/6/2010 03:35",
12-
"isHomogeneous" : "jok 3/29/2010 13:24",
13-
"isInitializable" : "jf 2/9/2010 11:28",
14-
"isSequenced" : "jf 2/6/2010 04:04",
15-
"isUnique" : "jok 3/29/2010 13:14",
16-
"testAsUppercase" : "jf 9/25/2009 16:50",
17-
"testCapitalized" : "pmm 9/1/2012 15:24",
18-
"testCapitalizedUmlauts" : "jf 9/25/2009 16:50",
19-
"testExcerpt" : "lr 2/7/2008 09:31",
20-
"testExcerptEmpty" : "lr 2/7/2008 09:31",
2113
"testExcerptLeft" : "lr 2/7/2008 09:30",
14+
"isExtensible" : "jf 2/6/2010 03:35",
15+
"testSubStrings" : "JohanBrichau 5/25/2017 11:31",
2216
"testExcerptRight" : "lr 2/7/2008 09:29",
17+
"testTrimLeft" : "lr 2/7/2008 09:34",
18+
"testExcerptEmpty" : "lr 2/7/2008 09:31",
19+
"allowsDuplicateValues" : "jf 2/6/2010 04:22",
20+
"testExcerpt" : "lr 2/7/2008 09:31",
21+
"testCapitalizedUmlauts" : "jf 9/25/2009 16:50",
22+
"testTrimRight" : "lr 2/7/2008 09:35",
23+
"testInflectorYyyySuffixes" : "pmm 9/1/2012 15:24",
24+
"testTrimBoth" : "jf 9/25/2009 16:46",
2325
"testInflectorAssimilated" : "lr 2/7/2008 10:21",
26+
"isInitializable" : "jf 2/9/2010 11:28",
2427
"testInflectorCommonSuffixes" : "lr 2/7/2008 09:11",
25-
"testInflectorFfffSuffixes" : "lr 2/7/2008 09:11",
28+
"isHomogeneous" : "jok 3/29/2010 13:24",
29+
"isSequenced" : "jf 2/6/2010 04:04",
2630
"testInflectorIrregular" : "lr 2/7/2008 10:21",
27-
"testInflectorNotInflecting" : "mlucas-smith 6/3/2009 22:33",
28-
"testInflectorTsssSuffixes" : "lr 2/7/2008 09:11",
29-
"testInflectorYyyySuffixes" : "pmm 9/1/2012 15:24",
30-
"testSubStrings" : "JohanBrichau 5/25/2017 11:31",
31-
"testTrimBoth" : "jf 9/25/2009 16:46",
32-
"testTrimLeft" : "lr 2/7/2008 09:34",
33-
"testTrimRight" : "lr 2/7/2008 09:35",
34-
"testTruncate" : "lr 2/7/2008 09:32",
35-
"testTruncateEmpty" : "lr 2/7/2008 09:32" } }
31+
"testInflectorFfffSuffixes" : "lr 2/7/2008 09:11",
32+
"excludedElement" : "jf 2/6/2010 02:20",
33+
"isUnique" : "jok 3/29/2010 13:14"
34+
},
35+
"class" : { }
36+
}

0 commit comments

Comments
 (0)
X Tutup