Skip to content

Commit 85bbc25

Browse files
author
Johan Brichau
committed
Added GRDynamicVariable implementation on GemStone
1 parent c7e2bc7 commit 85bbc25

File tree

5 files changed

+34
-1
lines changed

5 files changed

+34
-1
lines changed

repository/Grease-GemStone-Core.package/GRDynamicVariable.class/README.md

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
accessing
2+
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
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"class" : {
3+
"use:during:" : "JohanBrichau 05/25/2017 08:13" },
4+
"instance" : {
5+
} }
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"category" : "Grease-GemStone-Core",
3+
"classinstvars" : [
4+
],
5+
"classvars" : [
6+
],
7+
"commentStamp" : "",
8+
"instvars" : [
9+
],
10+
"name" : "GRDynamicVariable",
11+
"pools" : [
12+
],
13+
"super" : "DynamicVariable",
14+
"type" : "normal" }

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

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)