mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 06:04:31 +02:00
Use the length operator (#) instead of table.getn.
table.getn was deprecated in Lua 5.1 in favor of #, the length operator. See: http://www.lua.org/manual/5.1/manual.html#7.2
This commit is contained in:
@ -34,7 +34,7 @@ end
|
||||
|
||||
local check_parse_path = function(path, expect)
|
||||
local parsed = socket.url.parse_path(path)
|
||||
for i = 1, math.max(table.getn(parsed), table.getn(expect)) do
|
||||
for i = 1, math.max(#parsed, #expect) do
|
||||
if parsed[i] ~= expect[i] then
|
||||
print(path)
|
||||
os.exit()
|
||||
|
Reference in New Issue
Block a user