Skip to content

Commit

Permalink
Issue #672: Declare loadstring to be load when running Lua > 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Oct 23, 2023
1 parent 948ac21 commit 90224b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Configuration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ require("utils")
require("string_utils")
require("colorize")
require("myGlobals")
require("declare")
local Banner = require("Banner")
local BeautifulTbl = require('BeautifulTbl')
local ReadLmodRC = require('ReadLmodRC')
Expand Down Expand Up @@ -376,6 +375,7 @@ end
-- @param self A Configuration object
-- @return the configuration report in json as a single string.
function M.report_json(self)
require("declare")
declare("loadstring")
loadstring = (_VERSION == "Lua 5.1") and loadstring or load
local json = require("json")
Expand Down

0 comments on commit 90224b7

Please sign in to comment.