diff --git a/HISTORY.md b/HISTORY.md index eca780354..384470d69 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,11 @@ # Snap! (BYOB) History ## in development: +* **Notable Fixes:** + * only bind rings that replace list items to the list as environment if they are referred to by a non-numerical index (OOP 2.0) + +### 2024-09-12 +* threads: only bind rings replaced in a list to the list as environment if they are referred to by a non-numerical index (OOP 2.0) ## 10.1.1: * **Notable Fixes:** diff --git a/src/threads.js b/src/threads.js index fd6b73183..fabb29ff7 100644 --- a/src/threads.js +++ b/src/threads.js @@ -2293,7 +2293,8 @@ Process.prototype.doReplaceInList = function (index, list, element) { idx = 0; } } - if (element instanceof Context) { // OOP 2.0: treat ring as method + if (element instanceof Context && (parseFloat(idx) !== +idx)) { + // OOP 2.0: treat ring as method element = this.reportContextFor(element, list); } list.bind(idx, element);