[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Determining if _ENV is the first upvalue of a closure?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 13 Mar 2015 09:18:05 -0300
> I wish Lua had "env stacks"[1]
It does: use "local _ENV=" instead of setenv:
local _ENV={print=print}
print "normal stuff"
do
local _ENV= {print=function()
print "not normal"
end}
print()
end
print "normal stuff, again"