Skip to content

Commit

Permalink
Merge pull request #32 from johnfoconnor/master
Browse files Browse the repository at this point in the history
Dont mutate input opts in thread_opts
  • Loading branch information
moteus committed Mar 27, 2015
2 parents 80e9395 + c5902de commit 0246116
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lua/lzmq/impl/threads.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ local function thread_opts(code, opt)
return {source, prelude = prelude, lua_init = lua_init}
end

opt.source = assert(code)
return opt
return {
source = assert(code),
prelude = opt.prelude,
lua_init = opt.lua_init
}
end

local zthreads = {}
Expand Down

0 comments on commit 0246116

Please sign in to comment.