This commit is contained in:
Kartik K. Agaram 2023-11-09 18:03:29 -08:00
parent cd5ab62971
commit f6ee78f824

View File

@ -323,7 +323,7 @@ end
function live.eval(buf, filename)
-- We assume a program is either correct with 'return' prefixed xor not.
-- Is this correct? Who knows! But the Lua REPL does this as well.
local f = load('return '..buf, 'REPL')
local f = load('return '..buf, filename or 'REPL')
if f then
return pcall(f)
end