Aliases

None.

Arguments

any
required
The object whose raw metatable is replaced.
table
required
The metatable to assign.

Returns

any
The original value after its raw metatable is set.
Requires a table, not nil. For userdata and a writable new metatable, existing __namecall and __newindex are preserved when omitted.

Example