diff options
Diffstat (limited to 'testes/gc.lua')
-rw-r--r-- | testes/gc.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testes/gc.lua b/testes/gc.lua index 2332c939..d865cb28 100644 --- a/testes/gc.lua +++ b/testes/gc.lua | |||
@@ -676,11 +676,13 @@ end | |||
676 | -- just to make sure | 676 | -- just to make sure |
677 | assert(collectgarbage'isrunning') | 677 | assert(collectgarbage'isrunning') |
678 | 678 | ||
679 | do -- check that the collector is reentrant in incremental mode | 679 | do -- check that the collector is not reentrant in incremental mode |
680 | local res = true | ||
680 | setmetatable({}, {__gc = function () | 681 | setmetatable({}, {__gc = function () |
681 | collectgarbage() | 682 | res = collectgarbage() |
682 | end}) | 683 | end}) |
683 | collectgarbage() | 684 | collectgarbage() |
685 | assert(not res) | ||
684 | end | 686 | end |
685 | 687 | ||
686 | 688 | ||