Mercurial Hosting > luan
changeset 215:b2304de4579b
minor
git-svn-id: https://luan-java.googlecode.com/svn/trunk@216 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 11 Jul 2014 23:13:15 +0000 |
parents | 8e4ef9134362 |
children | a1b142f9c5c0 |
files | core/src/luan/impl/LuanCompiler.java |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
diff -r 8e4ef9134362 -r b2304de4579b core/src/luan/impl/LuanCompiler.java --- a/core/src/luan/impl/LuanCompiler.java Fri Jul 11 06:06:31 2014 +0000 +++ b/core/src/luan/impl/LuanCompiler.java Fri Jul 11 23:13:15 2014 +0000 @@ -28,12 +28,11 @@ final Closure c = new Closure(luanImpl,fnDef); if( passedEnv ) return c; - final LuanTable ENV = env; return new LuanFunction() { @Override public Object call(LuanState luan,Object[] args) throws LuanException { Object rtn = c.call(luan,args); if( rtn instanceof Object[] && ((Object[])rtn).length==0 ) - rtn = ENV; + rtn = c.upValues()[0].get(); return rtn; } };