From ee521e55f7474dad839ab3fe4402950d655b9753 Mon Sep 17 00:00:00 2001 From: hisham Date: Sun, 4 Oct 2009 16:09:17 +0000 Subject: more idiomatic code git-svn-id: http://luarocks.org/svn/luarocks/trunk@60 9ca3f7c1-7366-0410-b1a3-b5c78f85698c --- src/luarocks/persist.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/luarocks/persist.lua b/src/luarocks/persist.lua index 2bfd5765..293b5e93 100644 --- a/src/luarocks/persist.lua +++ b/src/luarocks/persist.lua @@ -20,8 +20,7 @@ function load_into_table(filename, tbl) if not chunk then return nil, err end - local result = {} - if tbl then result = tbl end + local result = tbl or {} setfenv(chunk, result) chunk() return result -- cgit v1.2.3-55-g6feb