-
-
Notifications
You must be signed in to change notification settings - Fork 747
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unicode in object accesses, eg c["\u00FC"]=42 (fix #2429)
- Loading branch information
1 parent
08b6c14
commit 666b040
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// https://github.com/espruino/Espruino/issues/2429 | ||
// there were already some changes in https://github.com/espruino/Espruino/commit/dde4d3a5ca52782fbe7cefacb18d52d9655b485a | ||
|
||
const s = "\u00FC"; | ||
const o = {}; | ||
const o2 = {"\u00FC":42}; // this one was ok after above changes | ||
|
||
// | ||
print("==================== O2"); | ||
trace(o2); // ok | ||
print("==================== O"); | ||
o[s] = 42; | ||
trace(o); // not ok | ||
|
||
// o an o2 were different before | ||
|
||
result = o["\u00FC"]==42; |