lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, May 3, 2012 at 5:46 PM, Andrew Budd <andrew.budd@gmail.com> wrote:
>  What I would like to do is add additional methods to those metatables from
> Lua.

Totally possible - it's a table, and you can add things to it.

> mt = getmetatable(io.stdout)
> mt.read2 = function(self) return self:read(),self:read() end