This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do | |
-- Polyfill for luajit without __pairs and __ipairs extensions | |
local triggered = false | |
pairs(setmetatable({}, { __pairs = function() | |
triggered = true | |
return function() end | |
end })) | |
if not triggered then | |
print "Polyfilling pairs" | |
function _G.pairs(t) |