Skip to content

Instantly share code, notes, and snippets.

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)