# HG changeset patch # User Jan Vrany # Date 1467663289 -3600 # Node ID 2961b428977319cf4142ea815405adaa6f4c0992 # Parent 093324d7a47cbe7c18a21b7600a2d72abfc607d4# Parent 5817f13cb16d39bf89231b5f52e5ca424299b672 Merge diff -r 093324d7a47c -r 2961b4289773 Dictionary.st --- a/Dictionary.st Fri Jul 01 15:31:10 2016 +0100 +++ b/Dictionary.st Mon Jul 04 21:14:49 2016 +0100 @@ -192,14 +192,14 @@ sz := keyArray size. newDict := self new:sz. - keyArray with:valueArray do:[:key :value | - newDict at:key put:value + 1 to:sz do:[:index | + newDict at:(keyArray at:index) put:(valueArray at:index). ]. ^ newDict " Dictionary withKeys:#('one' 'two' 'three' 'four') - andValues:#(1 2 3 4) + andValues:#(1 2 3 4) " ! @@ -292,6 +292,8 @@ ^ true ! ! + + !Dictionary methodsFor:'accessing'! associationAt:aKey @@ -2336,6 +2338,7 @@ ^ aVisitor visitDictionary:self with:aParameter ! ! + !Dictionary class methodsFor:'documentation'! version diff -r 093324d7a47c -r 2961b4289773 Process.st --- a/Process.st Fri Jul 01 15:31:10 2016 +0100 +++ b/Process.st Mon Jul 04 21:14:49 2016 +0100 @@ -2143,13 +2143,9 @@ |var| environment isNil ifTrue:[ - environment := IdentityDictionary new + environment := IdentityDictionary new ]. - var := environment at:aKey ifAbsent:nil. - var isNil ifTrue:[ - var := ValueHolder new. - environment at:aKey put:var. - ]. + var := environment at:aKey ifAbsentPut:[ValueHolder new]. var value:aValue. ^ aValue ! @@ -2157,8 +2153,7 @@ environmentIncludesKey:aKey "true if there is a thread local variable, false if no such variable exists" - environment isNil ifTrue:[^ false]. - ^ environment includesKey:aKey + ^ environment notNil and:[environment includesKey:aKey] ! stderr