Blob Blame History Raw
https://hg.prosody.im/trunk/log?rev=only%28%22tip%22%2C+%220.11.2%22%29+and+keyword%28%22lua+5.3%22%29

--- prosody-0.11.2/util/dependencies.lua		2019-01-07 16:34:23.000000000 +0100
+++ prosody-0.11.2/util/dependencies.lua.lua53		2019-07-25 22:36:39.000000000 +0200
@@ -140,7 +140,7 @@
 end
 
 local function log_warnings()
-	if _VERSION > "Lua 5.2" then
+	if _VERSION > "Lua 5.3" then
 		prosody.log("warn", "Support for %s is experimental, please report any issues", _VERSION);
 	end
 	local ssl = softreq"ssl";
--- prosody-0.11.2/spec/util_format_spec.lua		2019-01-07 16:34:23.000000000 +0100
+++ prosody-0.11.2/spec/util_format_spec.lua.lua53	2019-07-25 22:35:02.000000000 +0200
@@ -9,6 +9,8 @@
 			assert.equal("true", format("%s", true));
 			assert.equal("[true]", format("%d", true));
 			assert.equal("% [true]", format("%%", true));
+			assert.equal("{ }", format("%q", { }));
+			assert.equal("[1.5]", format("%d", 1.5));
 		end);
 	end);
 end);
--- prosody-0.11.2/util/format.lua			2019-01-07 16:34:23.000000000 +0100
+++ prosody-0.11.2/util/format.lua.lua53		2019-07-25 22:36:05.000000000 +0200
@@ -6,6 +6,9 @@
 local select = select;
 local unpack = table.unpack or unpack; -- luacheck: ignore 113/unpack
 local type = type;
+local num_type = math.type;
+
+local expects_integer = num_type and { c = true, d = true, i = true, o = true, u = true, X = true, x = true, } or {};
 
 local function format(formatstring, ...)
 	local args, args_length = { ... }, select('#', ...);
@@ -39,6 +42,9 @@
 			elseif type(arg) ~= "number" then -- arg isn't number as expected?
 				args[i] = tostring(arg);
 				spec = "[%s]";
+			elseif expects_integer[option] and num_type(arg) ~= "integer" then
+				args[i] = tostring(arg);
+				spec = "[%s]";
 			end
 		end
 		return spec;
--- prosody-0.11.2/plugins/mod_admin_telnet.lua		2019-01-07 16:34:23.000000000 +0100
+++ prosody-0.11.2/plugins/mod_admin_telnet.lua.lua53	2019-07-25 22:34:19.000000000 +0200
@@ -1207,7 +1207,7 @@
 	--do return tostring(value) end
 	if type == "duration" then
 		if ref_value < 0.001 then
-			return ("%d µs"):format(value*1000000);
+			return ("%g µs"):format(value*1000000);
 		elseif ref_value < 0.9 then
 			return ("%0.2f ms"):format(value*1000);
 		end