2,875
edits
(Add ipairs override) |
(Update ipairs/pairs override) |
||
Line 124: | Line 124: | ||
end; | end; | ||
__ipairs = function(self) | __ipairs = function(self) | ||
return self.nextFunc, self.contextFactory(), | return self.nextFunc, self.contextFactory(), self.index | ||
end; | end; | ||
} | } | ||
Line 148: | Line 148: | ||
end | end | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
-- Helper function for setting up iterator. | -- Helper function for setting up iterator. | ||
Line 1,148: | Line 1,145: | ||
end | end | ||
return nil | return nil | ||
end | |||
function Enumerator3.ipairs(self) | |||
return getIterator(self) | |||
end | |||
function Enumerator3.pairs(self) | |||
return getIterator(self) | |||
end | end | ||
edits