Fix xpcall arg check logic.

This commit is contained in:
James Roseborough
2010-04-15 14:35:05 +00:00
parent 576cf2068d
commit a77b93681f
3 changed files with 17 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ import java.net.URL;
import junit.framework.TestCase;
import org.luaj.vm2.LuaThread;
import org.luaj.vm2.LuaValue;
/**
@@ -89,6 +90,7 @@ public class Luajvm1CompatibilityTest extends TestCase {
PrintStream printStream = new PrintStream( outputStream );
try {
org.luaj.vm2.LuaTable _G = org.luaj.vm2.lib.JsePlatform.standardGlobals();
LuaThread.getRunning().setfenv(_G);
_G.get("package").get("loaders").checktable().insert(1, new org.luaj.vm2.lib.OneArgFunction(_G) {
public LuaValue call(LuaValue arg) {
String name = arg.toString();