Created
March 9, 2017 18:50
-
-
Save also/939a7380bbbff341bf894783c48ad90b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var reassign = loadWithNewGlobal({ | |
script: '(function (o, i) { o[i] = o[i]; })', | |
name: 'test.js' | |
}); | |
function test(i) { | |
var o = {}; | |
o[i] = true; | |
reassign(o, i); | |
print(JSON.stringify(o)); | |
} | |
test(-2147483648); // {"-2147483648":null} | |
test(-2147483647); // {"-2147483647":true} | |
test(2147483647); // {"2147483647":true} | |
test(2147483648); // {"2147483648":true,"-1":null} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment