michael@0: // Deleting the .next method makes for-of stop working on arrays. michael@0: michael@0: load(libdir + "asserts.js"); michael@0: load(libdir + "iteration.js"); michael@0: michael@0: var iterProto = Object.getPrototypeOf([][std_iterator]()); michael@0: delete iterProto.next; michael@0: assertThrowsInstanceOf(function () { for (var v of []) ; }, TypeError);