Skip to content

Commit

Permalink
adjusted based on retests with real browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Oct 1, 2024
1 parent 27d93ab commit b596f17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3992,7 +3992,7 @@ public static boolean compare(Object val1, Object val2, int op) {
if (val1 instanceof Number && val2 instanceof Number) {
return compare((Number) val1, (Number) val2, op);
} else {
if ((isSymbol(val1)) || (isSymbol(val2))) {
if (isSymbol(val1) || isSymbol(val2)) {
throw typeErrorById("msg.compare.symbol");
}
val1 = toPrimitive(val1, NumberClass);
Expand Down
4 changes: 2 additions & 2 deletions tests/testsrc/jstests/harmony/v8-symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ function TestEquality() {
assertTrue(symbols[i] == symbols[i])
assertFalse(symbols[i] === Object(symbols[i]))
assertFalse(Object(symbols[i]) === symbols[i])
assertFalse(symbols[i] == Object(symbols[i]))
assertFalse(Object(symbols[i]) == symbols[i])
assertTrue(symbols[i] == Object(symbols[i]))
assertTrue(Object(symbols[i]) == symbols[i])
assertTrue(symbols[i] === symbols[i].valueOf())
assertTrue(symbols[i].valueOf() === symbols[i])
assertTrue(symbols[i] == symbols[i].valueOf())
Expand Down

0 comments on commit b596f17

Please sign in to comment.