diff core/src/luan/impl/LeExpr.java @ 443:bf5e62a9090c

remove toBoolean() and to_boolean()
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 04 May 2015 14:55:51 -0600
parents f2c6c22cddc0
children b48cfa14ba60
line wrap: on
line diff
--- a/core/src/luan/impl/LeExpr.java	Mon May 04 13:49:12 2015 -0600
+++ b/core/src/luan/impl/LeExpr.java	Mon May 04 14:55:51 2015 -0600
@@ -33,10 +33,10 @@
 		LuanBit bit = luan.bit(se);
 		LuanFunction fn = bit.getBinHandler("__le",o1,o2);
 		if( fn != null )
-			return Luan.toBoolean( Luan.first(bit.call(fn,"__le",new Object[]{o1,o2})) );
+			return bit.checkBoolean( Luan.first(bit.call(fn,"__le",new Object[]{o1,o2})) );
 		fn = bit.getBinHandler("__lt",o1,o2);
 		if( fn != null )
-			return !Luan.toBoolean( Luan.first(bit.call(fn,"__lt",new Object[]{o2,o1})) );
+			return !bit.checkBoolean( Luan.first(bit.call(fn,"__lt",new Object[]{o2,o1})) );
 		throw bit.exception( "attempt to compare " + Luan.type(o1) + " with " + Luan.type(o2) );
 	}
 }