[squeak-dev] Bug in Environment>>#removeKey:ifAbsent:

christoph.thiede at student.hpi.uni-potsdam.de christoph.thiede at student.hpi.uni-potsdam.de
Sat Aug 28 23:28:01 UTC 2021

Hi all,

I just stumbled upon the following behavior:

	Smalltalk globals at: #MyTempVar put: 42.
	Smalltalk globals removeKey: #MyTempVar. "--> nil"

This confuses me, according to the method comment, I would have expected #removeKey: to answer the previously stored value instead, but somehow some binding policy appears to reset the value during removal. Is this a bug, or should we change the comment? Or should we just evaluate the binding prior to noticing the removal?


Sent from Squeak Inbox Talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210829/66f777f0/attachment.html>

More information about the Squeak-dev mailing list