Fixed lume.ripairs() for falsey values; added test

This commit is contained in:
rxi
2018-04-08 15:22:13 +01:00
parent 09035882f1
commit 0980d07eaa
2 changed files with 5 additions and 3 deletions

View File

@@ -724,7 +724,9 @@ end
local ripairs_iter = function(t, i)
i = i - 1
local v = t[i]
if v then return i, v end
if v ~= nil then
return i, v
end
end
function lume.ripairs(t)