diff options
Diffstat (limited to 'testes/main.lua')
| -rw-r--r-- | testes/main.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/testes/main.lua b/testes/main.lua index 1aa7b217..e0e9cbe8 100644 --- a/testes/main.lua +++ b/testes/main.lua | |||
| @@ -310,8 +310,11 @@ checkprogout("ZYX)\nXYZ)\n") | |||
| 310 | -- bug since 5.2: finalizer called when closing a state could | 310 | -- bug since 5.2: finalizer called when closing a state could |
| 311 | -- subvert finalization order | 311 | -- subvert finalization order |
| 312 | prepfile[[ | 312 | prepfile[[ |
| 313 | -- should be called last | 313 | -- ensure tables will be collected only at the end of the program |
| 314 | collectgarbage"stop" | ||
| 315 | |||
| 314 | print("creating 1") | 316 | print("creating 1") |
| 317 | -- this finalizer should be called last | ||
| 315 | setmetatable({}, {__gc = function () print(1) end}) | 318 | setmetatable({}, {__gc = function () print(1) end}) |
| 316 | 319 | ||
| 317 | print("creating 2") | 320 | print("creating 2") |
