[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: setting _ENV in Lua 5.2 when loading a file...?
- From: Matthew Frazier <leafstormrush@...>
- Date: Thu, 10 Nov 2011 06:50:04 -0500
On Nov 10, 2011, at 6:31 , Roberto Ierusalimschy wrote:
> return load(io.lines(filename, 2^12), filename, 't', env)
>
> seems reasonable.
>
> -- Roberto
It took me a minute to realize what `io.lines(filename, 2^12)` meant. loadfile's signature is currently just `loadfile([filename])`, why can't it be `loadfile([filename[, env]])` or `loadfile([filename[, mode[, env]]])`?
Thanks,
Matthew Frazier
http://leafstorm.us/