[meta] Use rawequal() to compare tables in isinstance().

Ensures no fancy metamethod is invoked during testing.
master
Lorenzo Cogotti 2 years ago
parent ac68fce474
commit 75d60b98f5

@ -15,7 +15,7 @@ local meta = {}
function meta.isinstance(obj, cls)
repeat
local m = getmetatable(obj)
if m == cls then return true end
if rawequal(m, cls) then return true end
obj = m
until obj == nil

Loading…
Cancel
Save