Index: test/mjsunit/array-length.js |
diff --git a/test/mjsunit/array-length.js b/test/mjsunit/array-length.js |
index 04b1750a4a46023b15026000ff41caabac92125a..c2b325061bad562f53f27d22080e2d4430e32962 100644 |
--- a/test/mjsunit/array-length.js |
+++ b/test/mjsunit/array-length.js |
@@ -105,6 +105,13 @@ var a = new Array(); |
assertEquals(Object(12), a.length = new Number(12)); |
assertEquals(12, a.length); |
+Number.prototype.valueOf = function() { return 10; } |
+var n = new Number(100); |
+assertEquals(n, a.length = n); |
+assertEquals(10, a.length); |
+n.valueOf = function() { return 20; } |
+assertEquals(n, a.length = n); |
+assertEquals(20, a.length); |
var o = { length: -23 }; |
Array.prototype.pop.apply(o); |