From b2f7b3b79f3117885b265575f6c5dbf934757797 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 21 Dec 2022 12:04:59 -0300 Subject: Control variables in for loops are read only --- testes/attrib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testes/attrib.lua') diff --git a/testes/attrib.lua b/testes/attrib.lua index 83821c06..fc427080 100644 --- a/testes/attrib.lua +++ b/testes/attrib.lua @@ -236,7 +236,7 @@ package.path = oldpath local fname = "file_does_not_exist2" local m, err = pcall(require, fname) for t in string.gmatch(package.path..";"..package.cpath, "[^;]+") do - t = string.gsub(t, "?", fname) + local t = string.gsub(t, "?", fname) assert(string.find(err, t, 1, true)) end -- cgit v1.2.3-55-g6feb