[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: String metatable sandboxing (was: Environment metatable)
- From: "Thiago L." <fakedme@...>
- Date: Thu, 17 Apr 2014 10:50:41 -0300
On 16/04/2014 17:45, Thiago L. wrote:
How about we have a getmetatable(_ENV).__stringmetatable or something?
String metatable sandbox and monkeypatching patch at the same time!
Rephrasing: How about we move the string metatable to _ENV's metatable?
That way modules can do their monkeypatching without affecting other
ppl's code...
_ENV's metatable would look like this:
setmetatable(_ENV,{
__stringmt = { -- this is a metafield (like __metatable)
__index = string
-- etc
}
})