Skip to content

Commit 27b9484

Browse files
author
Johan Brichau
authored
Merge pull request #24 from SeasideSt/pull23_dev
GRDynamicVariable
2 parents e0e49f0 + 85bbc25 commit 27b9484

File tree

73 files changed

+440
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+440
-257
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.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
I represent a dynamic variable i.e., a variable that is
2+
1. process local, that
3+
2. is defined for a given block and that
4+
3. can be nested.
5+
6+
For example:
7+
8+
GRDynamicVariable
9+
use: 1
10+
during: [
11+
self assert: GRDynamicVariable value = 1.
12+
GRDynamicVariable
13+
use: 2
14+
during: [ self assert: GRDynamicVariable value = 2 ].
15+
self assert: GRDynamicVariable value = 1 ].
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
accessing
2+
use: anObject during: aBlock
3+
^ self
4+
value: anObject
5+
during: aBlock
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"instance" : { },
3+
"class" : {
4+
"use:during:" : "MaxLeske 5/16/2017 21:54"
5+
}
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"commentStamp" : "MaxLeske 5/16/2017 22:05",
3+
"super" : "DynamicVariable",
4+
"category" : "Grease-Pharo30-Core",
5+
"classinstvars" : [ ],
6+
"pools" : [ ],
7+
"classvars" : [ ],
8+
"instvars" : [ ],
9+
"name" : "GRDynamicVariable",
10+
"type" : "normal"
11+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
{
2-
"name" : "GRPackage" }
2+
"name" : "GRPackage"
3+
}

0 commit comments

Comments
 (0)