aboutsummaryrefslogtreecommitdiff
path: root/testes/api.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-09 12:10:31 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-09 12:10:31 -0300
commitd881325c2fcbb6d2c434ec403b0bbe51ac200c7b (patch)
tree811c1a1ffa8f91693b8df64e040c509c2cec6ded /testes/api.lua
parent3f253f116e8e292977a1bded964544fb35b3d1e3 (diff)
downloadlua-d881325c2fcbb6d2c434ec403b0bbe51ac200c7b.tar.gz
lua-d881325c2fcbb6d2c434ec403b0bbe51ac200c7b.tar.bz2
lua-d881325c2fcbb6d2c434ec403b0bbe51ac200c7b.zip
Flag for to-be-closed variables changed to '<toclose>'
The flag for to-be-closed variables was changed from '*toclose' to '<toclose>'. Several people found confusing the old syntax and the new one has a clear terminator, making it more flexible for future changes.
Diffstat (limited to 'testes/api.lua')
-rw-r--r--testes/api.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/testes/api.lua b/testes/api.lua
index 08672e8a..bcc04dac 100644
--- a/testes/api.lua
+++ b/testes/api.lua
@@ -1137,7 +1137,8 @@ end)
1137testamem("to-be-closed variables", function() 1137testamem("to-be-closed variables", function()
1138 local flag 1138 local flag
1139 do 1139 do
1140 local *toclose x = setmetatable({}, {__close = function () flag = true end}) 1140 local <toclose> x =
1141 setmetatable({}, {__close = function () flag = true end})
1141 flag = false 1142 flag = false
1142 local x = {} 1143 local x = {}
1143 end 1144 end