[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: load, loadfile etc
- From: Patrick Rapin <toupie300@...>
- Date: Wed, 3 Aug 2011 17:22:28 +0200
>> Just to be sure: is load(io.lines "xxx") equivalent to loadfile "xxx"
>> right now? (Both 5.1.4 and 5.2?)
>
> Only for 5.2, sorry. I though we were talking about 5.2,
> because Dirk mentioned 5.2 at the start of the thread.
>
Not quite! The function loadfile, and dofile as a result, ignores the
first line if it begins with #! (shebang).
But load(io.lines "xxx") does not.
BTW: wouldn't it be better if the parser was responsible to remove the
shebang, instead of luaL_loadfile?