This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------------------------------------------- | |
-- AUTOMAGIC TABLES | |
---------------------------------------------------------------------------------------------------------------- | |
-- There is a well-known "standard" implementation of automagic tables at http://lua-users.org/wiki/AutomagicTables | |
-- | |
-- Unfortunately, that implementation behaves weirdly in some situations: | |
-- local a = AutomagicTable() | |
-- local x = a.b.c | |
-- local y = a.b.c | |
-- assert(x == y) -- assertion fails ! |