Commit f17039c8 authored by seny's avatar seny
Browse files

Fix docs

parent f515814f
...@@ -133,7 +133,7 @@ local json = require 'json' ...@@ -133,7 +133,7 @@ local json = require 'json'
local function filter(t) local function filter(t)
for k, v in pairs(t) do for k, v in pairs(t) do
if type(v) == 'number' and (v ~= v or v == 1/0 or v == -1/0) then if v ~= v or v == 1/0 or v == -1/0 then
error(("invalid value '%f' at index '%s'"):format(v, k)) error(("invalid value '%f' at index '%s'"):format(v, k))
end end
end end
...@@ -151,6 +151,7 @@ local function check(t) ...@@ -151,6 +151,7 @@ local function check(t)
end end
local t = { local t = {
str = 'abc',
val = 1.234, val = 1.234,
nan = 0/0, nan = 0/0,
inf = 1/0, inf = 1/0,
...@@ -158,6 +159,7 @@ local t = { ...@@ -158,6 +159,7 @@ local t = {
} }
local s = [[{ local s = [[{
"str": "abc",
"val": 1.234, "val": 1.234,
"nan": nan, "nan": nan,
"inf": inf, "inf": inf,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment