diff options
| author | Diego Nehab <diego.nehab@gmail.com> | 2016-02-11 11:01:57 -0200 |
|---|---|---|
| committer | Diego Nehab <diego.nehab@gmail.com> | 2016-02-11 11:01:57 -0200 |
| commit | 280e1d68a62ebf65b4526e300813e6d805216ea7 (patch) | |
| tree | 0e4bb188501594fdb274bbe88dc600558ecaed12 /src/ltn12.lua | |
| parent | 83880dbed77f9a0a3627bce2e7bfbe1b862e091d (diff) | |
| parent | 91928813466cd10b1b4e6f118f2decfb3b2aba33 (diff) | |
| download | luasocket-280e1d68a62ebf65b4526e300813e6d805216ea7.tar.gz luasocket-280e1d68a62ebf65b4526e300813e6d805216ea7.tar.bz2 luasocket-280e1d68a62ebf65b4526e300813e6d805216ea7.zip | |
Merge pull request #157 from mpeterv/ltn12-lua53
Fix error in ltn12 under Lua 5.3
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) |
