Michael Kay - 2006-06-05

Logged In: YES
user_id=251681

Correction to fix. The previous fix does not cover all
cases. The rule is that if either operand of "ne" or "!=" is
NaN, the result is true. So the code at the start of the
compare() method should be changed from:

if (v1 instanceof NumericValue && ((NumericValue)v1).isNaN()) {
return false;
}
if (v2 instanceof NumericValue &&
((NumericValue)v2).isNaN()) {
return false;
}

to:

if (v1 instanceof NumericValue && ((NumericValue)v1).isNaN()) {
return (op == Token.FNE);
}
if (v2 instanceof NumericValue &&
((NumericValue)v2).isNaN()) {
return (op == Token.FNE);
}