lua-users home
lua-l archive

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


On Wed, Jun 25, 2014 at 12:49 AM, Thiago L. <fakedme@gmail.com> wrote:
> On 24/06/2014 19:04, Pierre-Yves Gérardy wrote:
>>
>> I already spotted a bug:
>>
>> -            if loader == nil then
>> +            if type(loader) ~= "function" then
>> —Pierre-Yves
>
> Wait loaders can't be metatabled/__callable objects?

They can.

Looking at the 5.1 source, I see that there's also a sentinel used to
reject cycles.

Lua 5.2 is oblivious to require cycles, and will loop until the stack
overflows (too many C levels).

—Pierre-Yves