Removed support of nil in lume.ripairs(), updated tests

This commit is contained in:
rxi 2015-05-09 14:29:56 +01:00
parent 300f47456f
commit 6c350d81d9
2 changed files with 1 additions and 5 deletions

View File

@ -682,9 +682,6 @@ local ripairs_iter = function(t, i)
end
function lume.ripairs(t)
if t == nil then
return noop
end
return ripairs_iter, t, (#t + 1)
end

View File

@ -562,8 +562,7 @@ tests["lume.ripairs"] = function()
table.insert(r, { i, v })
end
testeq( r, { { 3, "c" }, { 2, "b" }, { 1, "a" } })
for i, v in lume.ripairs(nil) do
end
tester.test.error(lume.ripairs, nil)
end
-- lume.rgba