lua metatable assignment
snippet in lua

lua metatable assignment

user790

t = {}
print(getmetatable(t))   --> nil

t1 = {}
setmetatable(t, t1)
assert(getmetatable(t) == t1)   --> true