lua-users home
lua-l archive

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


> It is reasonable to expect that a core function like tostring will not
> crash when fed with basic Lua code (if a __tostring metamethod is
> defined, it is another story, of course).

It does not "crash". It raises an error when called in an incorrect
manner (there is nothing to be stringified). Most functions in Lua raise
an error when called with missing arguments.

The manual clearly states that 'tostring' expects an argument.

-- Roberto