lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On my machine, the result is true with Lua 5.3.

-------- 原始邮件 --------
发件人: Egor Skriptunoff
日期:2015-06-10 17:00 (GMT+08:00)
收件人: Lua mailing list
主题: string.dump(f, true) does not work as expected

In Lua 5.3 equal functions are converted to different dumps when strip==true.

local function f(x) return x+1 end
local function g(y) return y+1 end
print(string.dump(f, true) == string.dump(g, true))  --> false on Lua 5.3, true on LuaJIT

If both dumps are load()-ed to exactly the same closures, why these dumps are not equal after stripping debug info?

-- Egor