lua-users home
lua-l archive

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



On 09/12/14 03:46 AM, Dirk Laurie wrote:
2014-12-08 21:48 GMT+02:00 Thiago L. <fakedme@gmail.com>:
On 08/12/14 05:47 PM, Thiago L. wrote:

On 08/12/14 02:15 PM, Dirk Laurie wrote:
Do you expect the relationship
     `_ENV.string == getmetatable"".__index`
to survive?

local _ENV = {string = {}}
print(_ENV.string == getmetatable"".__index) --> false

Wait actually I'm not sure what you're asking...?
Do you want string.sub(str,i,j) and str:sub(i,j) to do the
same (as it now does) after you have assigned something
to _META.string?

I want to be able to tweak it as needed (aka if I change the string table I wanna be able to change the string metatable to do the same as the string table _BUT_ only inside the sandboxed environment)

So technically, considering I can _ENV.string = {}, it doesn't actually do the same does it?

--
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.