diff --git a/tests/examples/text/gears/object/signal.lua b/tests/examples/text/gears/object/signal.lua index e21bdb31..109d35fd 100644 --- a/tests/examples/text/gears/object/signal.lua +++ b/tests/examples/text/gears/object/signal.lua @@ -2,6 +2,11 @@ local gears = require("gears") --DOC_HIDE local o = gears.object{} +-- Add a __tostring metamethod for prettier output --DOC_HIDE +getmetatable(o).__tostring = function() --DOC_HIDE + return "[obj]" --DOC_HIDE +end --DOC_HIDE + -- Function can be attached to signals local function slot(obj, a, b, c) print("In slot", obj, a, b, c)