This has been reported in pharo fork as pharo-project#179 and also affects upstream opensmalltalk-vm
| result obj |
result := OrderedCollection new.
obj := { 1. 2. 3 }.
result add: (thisContext objectSize: obj). "Should be 3"
obj become: { 'a'. 'b'. }.
result add: (thisContext objectSize: obj). "Should be 2, but is 0"
Smalltalk garbageCollect.
result add: (thisContext objectSize: obj). "Should be 2"
result
"an OrderedCollection(3 0 2)"
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/566",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/566",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>