API setmetatable

Sets the metatable for the given table.
 table = setmetatable(table [, metatable])
==Arguments==
:;table: - The table to assign or remove the metatable of.
:;metatable: - The metatable to be assigned, or nil to remove an existing metatable.
==Returns==
:;table: - The table passed in as the first argument.
==Details==
* The Lua 5.1 reference manual extensively documents the fields that can be set on a metatable.
* As a non-standard extension, metatables can contain an __environment field which impacts the behavior of getfenv.
==Patch changes==