diff core/src/luan/LuanState.java @ 572:f1601a4ce1aa

fix stack when calling meta-methods
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 12 Jul 2015 21:34:23 -0600
parents ef0336efe33c
children 6cc2f047019b
line wrap: on
line diff
--- a/core/src/luan/LuanState.java	Wed Jul 08 23:10:52 2015 -0600
+++ b/core/src/luan/LuanState.java	Sun Jul 12 21:34:23 2015 -0600
@@ -63,27 +63,13 @@
 		return call(fn);
 	}
 
-	public String toString(Object obj) throws LuanException {
-		if( obj instanceof LuanTable ) {
-			LuanTable tbl = (LuanTable)obj;
-			return tbl.toString(this);
-		}
-		if( obj == null )
-			return "nil";
-		if( obj instanceof Number )
-			return Luan.toString((Number)obj);
-		if( obj instanceof byte[] )
-			return "binary: " + Integer.toHexString(obj.hashCode());
-		return obj.toString();
-	}
-
 	public final LuanBit bit(LuanElement el) {
 		return new LuanBit(this,el);
 	}
 
 	// convenience methods
 
-	final LuanBit JAVA = bit(null);
+	public final LuanBit JAVA = bit(null);
 
 	public LuanException exception(Object msg) throws LuanException {
 		return JAVA.exception(msg);