On 2006-06-23, at 17:22 EDT, Benjamin Shine wrote:

>
> The semantics of || (or) are different in rhino 1.5R3 and rhino 1.6R2.
>
> [EMAIL PROTECTED] vendor]$ java -jar /home/ben/lib/rhino1_5R3/js.jar
> Rhino 1.5 release 3 2002 01 27
> js> print (undefined || 2)
> 2
>
> [EMAIL PROTECTED] vendor]$ java -jar /home/ben/lib/rhino1_6R2/js.jar
> Rhino 1.6 release 2 2005 09 19
> js> print (undefined || 2)
> true
>
> Right now we run our lztests with rhino 1.5R3. The orbit branch is
> developing with rhino 1.6R2 or 1.6pre3. Tucker, which semantics are
> correct?

Rhino 1.6 has a bug.  ||  should coerce its first operand to a  
boolean and test if it is true.  undefined is defined to coerce to  
false.  Better send them a bug report!
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to