You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I executed the following code and found the result of rhino was different from other js engines' results. It seems like rhino has a reversed result.
Testcase
function foo1() {
foo2.prototype = arguments;
new foo2();
}
function foo2() {
var x = Array.prototype.sort.call(this,foo2);
for (var i = 0; i < x.length; i++) {
print(x[i]);
}
}
foo1(3,2,4,1);
Output
1
4
2
3
Expected behavior
3
2
4
1
The text was updated successfully, but these errors were encountered:
Description
Build version: 1.7.14
OS version: ubuntu20.04
I executed the following code and found the result of rhino was different from other js engines' results. It seems like rhino has a reversed result.
Testcase
Output
1
4
2
3
Expected behavior
3
2
4
1
The text was updated successfully, but these errors were encountered: