diff options
Diffstat (limited to 'testes/locals.lua')
| -rw-r--r-- | testes/locals.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/testes/locals.lua b/testes/locals.lua index 02f41980..5222802f 100644 --- a/testes/locals.lua +++ b/testes/locals.lua | |||
| @@ -310,8 +310,7 @@ do -- testing presence of second argument | |||
| 310 | local function foo (howtoclose, obj, n) | 310 | local function foo (howtoclose, obj, n) |
| 311 | local ca -- copy of 'a' visible inside its close metamethod | 311 | local ca -- copy of 'a' visible inside its close metamethod |
| 312 | do | 312 | do |
| 313 | local a <close> = func2close(function (...) | 313 | local a <close> = func2close(function (... | t) |
| 314 | local t = table.pack(...) | ||
| 315 | assert(select("#", ...) == n) | 314 | assert(select("#", ...) == n) |
| 316 | assert(t.n == n and t[1] == ca and (t.n < 2 or t[2] == obj)) | 315 | assert(t.n == n and t[1] == ca and (t.n < 2 or t[2] == obj)) |
| 317 | ca = 15 -- final value to be returned if howtoclose=="scope" | 316 | ca = 15 -- final value to be returned if howtoclose=="scope" |
| @@ -911,8 +910,7 @@ do | |||
| 911 | 910 | ||
| 912 | local extrares -- result from extra yield (if any) | 911 | local extrares -- result from extra yield (if any) |
| 913 | 912 | ||
| 914 | local function check (body, extra, ...) | 913 | local function check (body, extra, ...|t) |
| 915 | local t = table.pack(...) -- expected returns | ||
| 916 | local co = coroutine.wrap(body) | 914 | local co = coroutine.wrap(body) |
| 917 | if extra then | 915 | if extra then |
| 918 | extrares = co() -- runs until first (extra) yield | 916 | extrares = co() -- runs until first (extra) yield |
