diff options
author | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-04 16:09:17 +0000 |
---|---|---|
committer | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-04 16:09:17 +0000 |
commit | ee521e55f7474dad839ab3fe4402950d655b9753 (patch) | |
tree | 903eddde1a917f535e2cbdb1d3cb356e20574f3a | |
parent | d339f03ff7e8c7b1ca922aa75bb1461fb5faa97d (diff) | |
download | luarocks-ee521e55f7474dad839ab3fe4402950d655b9753.tar.gz luarocks-ee521e55f7474dad839ab3fe4402950d655b9753.tar.bz2 luarocks-ee521e55f7474dad839ab3fe4402950d655b9753.zip |
more idiomatic code
git-svn-id: http://luarocks.org/svn/luarocks/trunk@60 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
-rw-r--r-- | src/luarocks/persist.lua | 3 |
1 files changed, 1 insertions, 2 deletions
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) | |||
20 | if not chunk then | 20 | if not chunk then |
21 | return nil, err | 21 | return nil, err |
22 | end | 22 | end |
23 | local result = {} | 23 | local result = tbl or {} |
24 | if tbl then result = tbl end | ||
25 | setfenv(chunk, result) | 24 | setfenv(chunk, result) |
26 | chunk() | 25 | chunk() |
27 | return result | 26 | return result |