comparison src/luan/modules/BasicLuan.java @ 1302:5345466fa61f

fix last commit and improve stringify
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 13 Jan 2019 17:28:57 -0700
parents 01a380c494f2
children 11d3640e739d
comparison
equal deleted inserted replaced
1301:a9cc35c71eb0 1302:5345466fa61f
226 } else { 226 } else {
227 return obj.hashCode(); 227 return obj.hashCode();
228 } 228 }
229 } 229 }
230 230
231 public static String stringify(Object obj,Boolean strict) throws LuanException { 231 public static String stringify(Object obj,String strict) throws LuanException {
232 boolean b = strict!=null ? strict : false; 232 boolean b;
233 if( strict==null ) {
234 b = false;
235 } else if( strict.equals("strict") ) {
236 b = true;
237 } else {
238 throw new LuanException("strict must be nil or 'strict'");
239 }
233 return LuanToString.toString(obj,b); 240 return LuanToString.toString(obj,b);
234 } 241 }
235 242
236 } 243 }