Skip to content

Commit

Permalink
Upgraded Mobdebug (0.628) to include keyignore serializer option.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulchenko committed Jul 26, 2015
1 parent cdc464b commit 54ffda9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lualibs/mobdebug/mobdebug.lua
Expand Up @@ -19,7 +19,7 @@ end)("os")

local mobdebug = {
_NAME = "mobdebug",
_VERSION = 0.627,
_VERSION = 0.628,
_COPYRIGHT = "Paul Kulchenko",
_DESCRIPTION = "Mobile Remote Debugger for the Lua programming language",
port = os and os.getenv and tonumber((os.getenv("MOBDEBUG_PORT"))) or 8172,
Expand Down Expand Up @@ -129,7 +129,7 @@ end
local function q(s) return string.gsub(s, '([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end

local serpent = (function() ---- include Serpent module for serialization
local n, v = "serpent", 0.284 -- (C) 2012-15 Paul Kulchenko; MIT License
local n, v = "serpent", 0.285 -- (C) 2012-15 Paul Kulchenko; MIT License
local c, d = "Paul Kulchenko", "Lua serializer and pretty printer"
local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'}
local badtype = {thread = true, userdata = true, cdata = true}
Expand Down Expand Up @@ -201,6 +201,7 @@ local function s(t, opts)
local value, ktype, plainindex = t[key], type(key), n <= maxn and not sparse
if opts.valignore and opts.valignore[value] -- skip ignored values; do nothing
or opts.keyallow and not opts.keyallow[key]
or opts.keyignore and opts.keyignore[key]
or opts.valtypeignore and opts.valtypeignore[type(value)] -- skipping ignored value types
or sparse and value == nil then -- skipping nils; do nothing
elseif ktype == 'table' or ktype == 'function' or badtype[ktype] then
Expand Down

0 comments on commit 54ffda9

Please sign in to comment.