diff --git a/busted/outputHandlers/json.lua b/busted/outputHandlers/json.lua index f7aa8668..97a07f37 100644 --- a/busted/outputHandlers/json.lua +++ b/busted/outputHandlers/json.lua @@ -14,9 +14,7 @@ return function(options) errors = handler.errors, duration = handler.getDuration() } - local ok, result = pcall(function() - return json.encode(error_info) - end) + local ok, result = pcall(json.encode, error_info) if ok then io_write(result)