comparison src/luan/LuanState.java @ 150:f35c50027985

make load() more consistent git-svn-id: https://luan-java.googlecode.com/svn/trunk@151 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Mon, 16 Jun 2014 10:11:48 +0000
parents f99fd64291b3
children 1de3e4a6e82d
comparison
equal deleted inserted replaced
149:f99fd64291b3 150:f35c50027985
150 } 150 }
151 } 151 }
152 152
153 public final Object eval(String cmd) { 153 public final Object eval(String cmd) {
154 try { 154 try {
155 LuanFunction fn = BasicLib.load(this,cmd,"eval",null,true); 155 LuanFunction fn = BasicLib.load(this,cmd,"eval",new LuanTable(),true);
156 return call(fn); 156 return call(fn);
157 } catch(LuanException e) { 157 } catch(LuanException e) {
158 throw new RuntimeException(e); 158 throw new RuntimeException(e);
159 } 159 }
160 } 160 }