Mercurial Hosting > luan
diff core/src/luan/modules/StringLuan.java @ 443:bf5e62a9090c
remove toBoolean() and to_boolean()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 04 May 2015 14:55:51 -0600 |
parents | 93e6e67768d7 |
children | 8b2db645b9b2 |
line wrap: on
line diff
--- a/core/src/luan/modules/StringLuan.java Mon May 04 13:49:12 2015 -0600 +++ b/core/src/luan/modules/StringLuan.java Mon May 04 14:55:51 2015 -0600 @@ -181,7 +181,7 @@ while( i<max && m.find() ) { String match = m.groupCount()==0 ? m.group() : m.group(1); Object val = t.get(luan,match); - if( Luan.toBoolean(val) ) { + if( val != null ) { String replacement = luan.checkString(val); if( replacement==null ) throw luan.exception( "invalid replacement value (a "+Luan.type(val)+")" ); @@ -208,7 +208,7 @@ } } Object val = Luan.first( luan.call(fn,"repl-arg",args) ); - if( Luan.toBoolean(val) ) { + if( val != null ) { String replacement = luan.checkString(val); if( replacement==null ) throw luan.exception( "invalid replacement value (a "+Luan.type(val)+")" );