lua-users home
lua-l archive

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


On Mon, Aug 16, 2010 at 12:40 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> The typical Lua convention is to return nil, <error> on error, and
>> whatever the result is on non-error. It's not a hard-and-fast rule,
>> but some functions depend on it (like assert()).
>
> assert depends on true/false, not nil.
>

I just tested, I guess it asserts on both false and nil (i.e. any
false-y value).

Today just isn't my day...
~Jonathan