diff options
Diffstat (limited to 'src/ltn12.lua')
| -rw-r--r-- | src/ltn12.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ltn12.lua b/src/ltn12.lua index 1014de2..dede0fa 100644 --- a/src/ltn12.lua +++ b/src/ltn12.lua | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | ----------------------------------------------------------------------------- | 9 | ----------------------------------------------------------------------------- |
| 10 | local string = require("string") | 10 | local string = require("string") |
| 11 | local table = require("table") | 11 | local table = require("table") |
| 12 | local unpack = unpack or table.unpack | ||
| 12 | local base = _G | 13 | local base = _G |
| 13 | local _M = {} | 14 | local _M = {} |
| 14 | if module then -- heuristic for exporting a global package table | 15 | if module then -- heuristic for exporting a global package table |
| @@ -42,7 +43,7 @@ end | |||
| 42 | -- (thanks to Wim Couwenberg) | 43 | -- (thanks to Wim Couwenberg) |
| 43 | function filter.chain(...) | 44 | function filter.chain(...) |
| 44 | local arg = {...} | 45 | local arg = {...} |
| 45 | local n = select('#',...) | 46 | local n = base.select('#',...) |
| 46 | local top, index = 1, 1 | 47 | local top, index = 1, 1 |
| 47 | local retry = "" | 48 | local retry = "" |
| 48 | return function(chunk) | 49 | return function(chunk) |
