Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stevedonovan/Penlight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lua/pl/compat.lua')
-rw-r--r--lua/pl/compat.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/pl/compat.lua b/lua/pl/compat.lua
index e466494..7791009 100644
--- a/lua/pl/compat.lua
+++ b/lua/pl/compat.lua
@@ -225,9 +225,9 @@ end
-- This functions mimics the `warn` function added in Lua 5.4.
-- @function warn
-- @param ... any arguments
-if not warn then -- luacheck: ignore
+if not rawget(_G, warn) then
local enabled = false
- local function warn(arg1, ...) -- luacheck: ignore
+ local function warn(arg1, ...)
if type(arg1) == "string" and arg1:sub(1, 1) == "@" then
-- control message
if arg1 == "@on" then