Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Yonaba/Moses.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland <roland.yonaba@gmail.com>2018-08-14 19:39:08 +0300
committerGitHub <noreply@github.com>2018-08-14 19:39:08 +0300
commitb44b453e01e834a5d6917a12f1fd6faa38b44b3a (patch)
tree683d37eb142e60bf65a4ce4a7dfa82708daa1a67
parent04f98d3c8da4e16c0bd55475d5e73e7ddd4d4aaf (diff)
parent0d32ff84682941edca14a5d643c4df27c3e2c75c (diff)
Merge pull request #57 from personalnadir/master
Prevents the wrapper from failing with tables having custom metatables returning values or unset keys
-rw-r--r--moses.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/moses.lua b/moses.lua
index 264fac1..1e4b1b3 100644
--- a/moses.lua
+++ b/moses.lua
@@ -2208,7 +2208,7 @@ do
-- Register all functions into the wrapper
for fname,fct in pairs(_) do
f[fname] = function(v, ...)
- local wrapped = _.isTable(v) and v._wrapped or false
+ local wrapped = _.isTable(v) and rawget(v,'_wrapped') or false
if wrapped then
local _arg = v._value
local _rslt = fct(_arg,...)