From 79999cecedd84e99655fbcdba0bd4e715a22173f Mon Sep 17 00:00:00 2001 From: alyx Date: Fri, 5 Apr 2024 17:27:46 -0400 Subject: Lua support feature-complete Full implementation of debug mode still pending --- src/theming/lua-lib/expect.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/theming/lua-lib/expect.lua') diff --git a/src/theming/lua-lib/expect.lua b/src/theming/lua-lib/expect.lua index 9afbb49..20772b2 100644 --- a/src/theming/lua-lib/expect.lua +++ b/src/theming/lua-lib/expect.lua @@ -50,7 +50,7 @@ local function get_display_type(value, t) -- Cobalt and only read the metatable for tables/userdata. if t ~= "table" and t ~= "userdata" then return t end - local metatable = debug.getmetatable(value) + local metatable = getmetatable(value) if not metatable then return t end local name = rawget(metatable, "__name") @@ -72,8 +72,8 @@ local function expect(index, value, ...) -- If we can determine the function name with a high level of confidence, try to include it. local name - local ok, info = pcall(debug.getinfo, 3, "nS") - if ok and info.name and info.name ~= "" and info.what ~= "C" then name = info.name end + -- local ok, info = pcall(debug.getinfo, 3, "nS") + -- if ok and info.name and info.name ~= "" and info.what ~= "C" then name = info.name end t = get_display_type(value, t) -- cgit v1.2.3-54-g00ecf