[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Enhanced tostring
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 23 Oct 2009 09:11:53 -0200
> What if the object wants to protect the metatable from public access, like this?
It still works for me.
require"bc"
bc.digits(20)
x=bc.sqrt(2)
print(getmetatable(x))
print(x)
print(x:tostring())
print(x:__tostring())
getmetatable(x).__metatable=false
print(getmetatable(x))
print(x)
print(x:tostring())
print(x:__tostring())