1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-10 08:44:28 +02:00

Fix awkward wording in English Lua documentation (#5365)

In addition, the cited list of metamethods isn't exhaustive.

A detailed list of operations controlled by metatables is available at:
https://www.lua.org/manual/5.4/manual.html#2.4

Signed-off-by: Boris Verkhovskiy <boris.verk@gmail.com>
This commit is contained in:
Éric NICOLAS
2025-08-08 19:34:36 +02:00
committed by GitHub
parent 696320fd2a
commit e54606c9c7

4
lua.md
View File

@@ -232,8 +232,8 @@ eatenBy = myFavs.animal -- works! thanks, metatable
-- An __index value can also be a function(tbl, key)
-- for more customized lookups.
-- Values of __index,add, .. are called metamethods.
-- Full list. Here a is a table with the metamethod.
-- The values of __index, __add, etc. are called
-- metamethods. Here are some commonly used ones:
-- __add(a, b) for a + b
-- __sub(a, b) for a - b