Bug 50397

GemStone/S 64 Bit

3.6.5, 3.6.4, 3.6.3, 3.6.2, 3.6.1, 3.6

3.6.6

AbstractDictionary>>at:ifPresent: inadvertently removed from image

The method AbstractDictionary>>at:ifPresent: was added in 3.5.x along with other support methods for CodeLibrarian; this was inadvertently removed during the code cleanup for v.3.6.

Workaround

Install the following as SystemUser.

category: '*Metacello-GsCypress-MC'
method: AbstractDictionary
at: key ifPresent: aBlock
   "Lookup the given key in the receiver. If it is present, answer the value of
    evaluating the given block with the value associated with the key. Otherwise, answer nil."

        | v |
        v := self at: key ifAbsent: [^ nil].
        ^ aBlock value: v
%

Last updated: 7/17/23