aboutsummaryrefslogtreecommitdiff
path: root/testes/gc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'testes/gc.lua')
-rw-r--r--testes/gc.lua6
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
677assert(collectgarbage'isrunning') 677assert(collectgarbage'isrunning')
678 678
679do -- check that the collector is reentrant in incremental mode 679do -- 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)
684end 686end
685 687
686 688