diff options
| author | jmoenig <jens@moenig.org> | 2014-11-24 09:28:45 +0100 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-11-24 09:28:45 +0100 |
| commit | 8814b61a323a2fb554cf1869f6a7b8ab06009764 (patch) | |
| tree | 1037821f5aef848ebec3dbebcd20f7e21e3559bf | |
| parent | 781144aa3cf05ea00652d224baef03eb157dce52 (diff) | |
| download | snap-8814b61a323a2fb554cf1869f6a7b8ab06009764.tar.gz snap-8814b61a323a2fb554cf1869f6a7b8ab06009764.zip | |
Fixed #318
| -rwxr-xr-x | history.txt | 5 | ||||
| -rw-r--r-- | threads.js | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/history.txt b/history.txt index 5a41f5a..4d17e3e 100755 --- a/history.txt +++ b/history.txt @@ -2341,3 +2341,8 @@ ______ 1411213 ------- * Threads: Fix “stop this block” primitive for tail-call-elimination + +1411214 +------- +* Threads: Fixed #318 + @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2014-November-23'; +modules.threads = '2014-November-24'; var ThreadManager; var Process; @@ -100,8 +100,18 @@ function snapEquals(a, b) { var x = +a, y = +b, + i, specials = [true, false, '']; + // "zum Schneckengang verdorben, was Adlerflug geworden wäre" + // collecting edge-cases that somebody complained about + // on Github. Folks, take it easy and keep it fun, okay? + // Shit like this is patently ugly and slows Snap down. Tnx! + for (i = 9; i <= 13; i += 1) { + specials.push(String.fromCharCode(i)); + } + specials.push(String.fromCharCode(160)); + // check for special values before coercing to numbers if (isNaN(x) || isNaN(y) || [a, b].some(function (any) {return contains(specials, any) || @@ -110,7 +120,7 @@ function snapEquals(a, b) { y = b; } - // handle text comparision case-insensitive. + // handle text comparison case-insensitive. if (isString(x) && isString(y)) { return x.toLowerCase() === y.toLowerCase(); } |
