diff --git a/HISTORY.md b/HISTORY.md index b62b5afd56..81bb83ae3e 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -12,6 +12,7 @@ * lists: fixed a RESHAPE edge case when passing in a single zero dimension * lists: made sure ITEM OF returns data matching the shape specified by the query struct * lists: hyperized ITEM OF +* threads: refactored reportRank() ## 9.1.1: * **Notable Fixes:** diff --git a/snap.html b/snap.html index 8c0b37d518..d5a86b74ac 100755 --- a/snap.html +++ b/snap.html @@ -17,7 +17,7 @@ - + diff --git a/src/threads.js b/src/threads.js index 90b670d08c..29512b6d27 100644 --- a/src/threads.js +++ b/src/threads.js @@ -65,7 +65,7 @@ StagePickerMorph, CustomBlockDefinition, CommentMorph*/ /*jshint esversion: 11, bitwise: false, evil: true*/ -modules.threads = '2023-November-29'; +modules.threads = '2024-January-03'; var ThreadManager; var Process; @@ -2264,7 +2264,7 @@ Process.prototype.reportListAttribute = function (choice, list) { this.assertType(list, 'list'); return list.size(); case 'rank': - return list instanceof List ? list.rank() : 0; + return this.reportRank(list); case 'dimensions': return list instanceof List ? list.shape() : new List(); case 'flatten': @@ -2374,6 +2374,10 @@ Process.prototype.reportListIsEmpty = function (list) { return list.isEmpty(); }; +Process.prototype.reportRank = function (data) { + return data instanceof List ? data.rank() : 0; +}; + Process.prototype.doShowTable = function (list) { // experimental this.assertType(list, 'list');