From 6c350d81d9592eff6023fa886e6cc5c7f3a23e4d Mon Sep 17 00:00:00 2001 From: rxi Date: Sat, 9 May 2015 14:29:56 +0100 Subject: [PATCH] Removed support of `nil` in lume.ripairs(), updated tests --- lume.lua | 3 --- test/test_lume.lua | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lume.lua b/lume.lua index 927c1c7..0f203ee 100644 --- a/lume.lua +++ b/lume.lua @@ -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 diff --git a/test/test_lume.lua b/test/test_lume.lua index 607d02d..f446276 100644 --- a/test/test_lume.lua +++ b/test/test_lume.lua @@ -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