Substituted use of var name "arg" in lume.fn()

The use of a variable called "arg" was causing a bug in lume.fn() for
lua5.1 which creates a table named "arg" when a variable number of
arguments are used. The variable name has been changed to "args" to
avoid the conflict.
This commit is contained in:
rxi 2014-03-03 21:01:39 +00:00
parent d1e6c0334b
commit 8283410210

View File

@ -174,9 +174,9 @@ end
function lume.fn(fn, ...)
local arg = {...}
local args = {...}
return function(...)
local a = lume.merge(lume.clone(arg), {...})
local a = lume.merge(lume.clone(args), {...})
return fn(unpack(a))
end
end