Mercurial Hosting > luan
diff core/src/luan/impl/EqExpr.java @ 363:17b02b56d806
fix LuanPropertyTable.asMap();
fix binary==binary;
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 16 Apr 2015 10:12:58 -0600 |
parents | 2456ef7ada02 |
children | d55e873e1f0d |
line wrap: on
line diff
--- a/core/src/luan/impl/EqExpr.java Wed Apr 15 20:33:47 2015 -0600 +++ b/core/src/luan/impl/EqExpr.java Thu Apr 16 10:12:58 2015 -0600 @@ -1,5 +1,6 @@ package luan.impl; +import java.util.Arrays; import luan.Luan; import luan.LuanFunction; import luan.LuanTable; @@ -28,6 +29,11 @@ Number n2 = (Number)o2; return n1.doubleValue() == n2.doubleValue(); } + if( o1 instanceof byte[] && o2 instanceof byte[] ) { + byte[] b1 = (byte[])o1; + byte[] b2 = (byte[])o2; + return Arrays.equals(b1,b2); + } if( o1==null || o2==null || !o1.getClass().equals(o2.getClass()) ) return false; LuanTable mt1 = luan.getMetatable(o1);