The Trunk: System-cmm.728.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-cmm.728.mcz

commits-2
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.728.mcz

==================== Summary ====================

Name: System-cmm.728
Author: cmm
Time: 28 April 2015, 8:05:45.267 pm
UUID: b5d7931b-5910-4d0c-bf8c-41edb3b40062
Ancestors: System-cmm.724, System-kfr.727

Restored the much safer version of Preferences class>>#preferenceAt:ifAbsent:.

=============== Diff against System-kfr.727 ===============

Item was changed:
  ----- Method: Preferences class>>preferenceAt:ifAbsent: (in category 'preference-object access') -----
  preferenceAt: aSymbol ifAbsent: aBlock
  "Answer the Preference object at the given symbol, or the value of aBlock if not present"
 
+ self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences |
+                 dictionaryOfPreferences
+                         at: aSymbol
+                         ifPresent: [ :preference | ^preference ] ].
+         ^aBlock value!
- ^self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences |
- dictionaryOfPreferences at: aSymbol ifAbsent: aBlock ]!