Skip to content

Commit

Permalink
Fixed garbage collection of 'captured' values (pkulchenko/ZeroBraneSt…
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulchenko committed Jul 20, 2018
1 parent 6f6281e commit 7acfc6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mobdebug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ end)("os")

local mobdebug = {
_NAME = "mobdebug",
_VERSION = "0.704",
_VERSION = "0.705",
_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 @@ -454,7 +454,7 @@ local function capture_vars(level, thread)
-- including access to globals, but this causes vars[name] to fail in
-- restore_vars on local variables or upvalues with `nil` values when
-- 'strict' is in effect. To avoid this `rawget` is used in restore_vars.
setmetatable(vars, { __index = getfenv(func), __newindex = getfenv(func) })
setmetatable(vars, { __index = getfenv(func), __newindex = getfenv(func), __mode = "v" })
return vars
end

Expand Down

0 comments on commit 7acfc6f

Please sign in to comment.