This repository was archived by the owner on Nov 20, 2020. It is now read-only.
arg isn't always the arguments #2
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
afaik the only way you can be sure you have a function's arguments is to
use the {...} construct. They say "arg" works, but it sort of doesn't.
In this case, calling date() with any arguments, results in an arg
variable being created (for some reason) as a table with 0 arguments.
{...} of course has the proper arguments, so I guess arg is just left in
there to break everything.
For instance, date('2014-10-24 21:56:42.095-07') gives the same result
as calling date() and never actually produces a date on the 24th of
October (unless that's the current date). It might just be luajit, but
it's probably safer to use {...} in any case.
Easy enough to explicitly specify that arg should be {...}.