refactor: Don't assign scope to variable from Lua VM
This commit is contained in:
parent
42311877f0
commit
ce1229b434
3
ldoc.lua
3
ldoc.lua
|
@ -256,11 +256,10 @@ ldoc_contents = tablex.makeset(ldoc_contents)
|
||||||
|
|
||||||
local function loadstr (ldoc,txt)
|
local function loadstr (ldoc,txt)
|
||||||
local chunk, err
|
local chunk, err
|
||||||
local load
|
|
||||||
-- Penlight's Lua 5.2 compatibility has wobbled over the years...
|
-- Penlight's Lua 5.2 compatibility has wobbled over the years...
|
||||||
if not rawget(_G,'loadin') then -- Penlight 0.9.5
|
if not rawget(_G,'loadin') then -- Penlight 0.9.5
|
||||||
-- Penlight 0.9.7; no more global load() override
|
-- Penlight 0.9.7; no more global load() override
|
||||||
load = load or utils.load
|
local load = load or utils.load
|
||||||
chunk,err = load(txt,'config',nil,ldoc)
|
chunk,err = load(txt,'config',nil,ldoc)
|
||||||
else
|
else
|
||||||
-- luacheck: push ignore 113
|
-- luacheck: push ignore 113
|
||||||
|
|
Loading…
Reference in New Issue