Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
Philipp Janda edited this page Mar 11, 2015 · 2 revisions

pairs

The pairs function in Lua 5.2 respects a metamethod __pairs. The compatibility implementation does the same, but since it is implemented in Lua in relies on debug.getmetatable (if available) or getmetatable to check for that metamethod. If debug.getmetatable is not available, this might not work for metatables containing a __metatable field. See also ipairs.

Clone this wiki locally