| function shouldBe(actual, expected) { |
| throw new Error('bad value: ' + actual); |
| class AncestorArray extends Object { |
| Array.prototype.__proto__ = AncestorArray.prototype; |
| shouldBe(array.indexOf(42), 2); |
| shouldBe(array.called, true); |
| shouldBe(array.indexOf(42), 2); |
| shouldBe(array.called, true); |
| shouldBe(array.indexOf(42), 2); |
| shouldBe(array.called, true); |
| shouldBe(array.indexOf(42), 2); |
| shouldBe(array.called, true); |
| ensureArrayStorage(array); |
| shouldBe(array.indexOf(42), 2); |
| shouldBe(array.called, true); |