michael@0: // 'this' in a generator-expression non-strict function produces the expected michael@0: // object. michael@0: michael@0: Number.prototype.iters = function () { michael@0: return [(this for (x of [0])), michael@0: (this for (y of [0]))]; michael@0: }; michael@0: michael@0: var [a, b] = (3).iters(); michael@0: var three = a.next(); michael@0: assertEq(Object.prototype.toString.call(three), '[object Number]'); michael@0: assertEq(+three, 3); michael@0: assertEq(b.next(), three);