[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (work1) now available
- From: Tom N Harris <telliamed@...>
- Date: Mon, 11 Jan 2010 16:54:51 -0500
Patrick Donnelly wrote:
>
> I don't see any error in the implementation here. Try this:
>
>> do
> T=setmetatable({},{
> __len=setmetatable({gth=0},{
> __call=function(o) return o.gth end
> })
> })
> getmetatable(T).__len.gth = 3
> print(#T)
> end
> 3
>
> ?
>
My mistake. I thought Lua would try to return #__len if it was a table.
Of course it does no such thing.
--
- tom
telliamed@whoopdedo.org
- References:
- [ANN] Lua 5.2.0 (work1) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.2.0 (work1) now available, Alexander Gladysh
- Re: [ANN] Lua 5.2.0 (work1) now available, Alexander Gladysh
- Re: [ANN] Lua 5.2.0 (work1) now available, Ignacio Burgueño
- Re: [ANN] Lua 5.2.0 (work1) now available, steve donovan
- Re: [ANN] Lua 5.2.0 (work1) now available, Alexander Gladysh
- Re: [ANN] Lua 5.2.0 (work1) now available, steve donovan
- Re: [ANN] Lua 5.2.0 (work1) now available, Tom N Harris
- Re: [ANN] Lua 5.2.0 (work1) now available, Nevin Flanagan
- Re: [ANN] Lua 5.2.0 (work1) now available, Tom N Harris
- Re: [ANN] Lua 5.2.0 (work1) now available, Patrick Donnelly