changeset 455:34a4ed3597ea

enable String java methods
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 05 May 2015 21:25:35 -0600
parents fcb6b6a5fa37
children ceb3fd33adf1
files core/src/luan/modules/JavaLuan.java core/src/luan/modules/StringLuan.java
diffstat 2 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/core/src/luan/modules/JavaLuan.java	Tue May 05 19:07:53 2015 -0600
+++ b/core/src/luan/modules/JavaLuan.java	Tue May 05 21:25:35 2015 -0600
@@ -46,11 +46,6 @@
 			throw luan.exception("Java isn't allowed");
 	}
 
-	private static boolean isLoaded(LuanState luan) {
-//		return PackageLuan.loaded(luan).get("luan:Java") != null;
-		return true;
-	}
-
 	public static Object __index(LuanState luan,Object obj,Object key) throws LuanException {
 		checkJava(luan);
 		if( obj instanceof Static ) {
--- a/core/src/luan/modules/StringLuan.java	Tue May 05 19:07:53 2015 -0600
+++ b/core/src/luan/modules/StringLuan.java	Tue May 05 21:25:35 2015 -0600
@@ -28,6 +28,8 @@
 				}
 			};
 		}
+		if( luan.currentEnvironment().hasJava() )
+			return JavaLuan.__index(luan,s,key);
 		return null;
 	}