Summary: | shouldBe() should support NaN | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> | ||||
Component: | Tools / Tests | Assignee: | Alexey Proskuryakov <ap> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | zimmermann | ||||
Priority: | P2 | ||||||
Version: | 523.x (Safari 3) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.4 | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 12953 | ||||||
Attachments: |
|
Description
Alexey Proskuryakov
2007-03-04 00:33:36 PST
Created attachment 13468 [details]
proposed patch
Looks fine, though what is the "===" operator? (you didn't add it - just wondering though...) - else if (_av === _bv) + else if (_av === _bv || (typeof(_av) == "number" && typeof(_bv) == "number" && isNaN(_av) && isNaN(_bv))) Niko (In reply to comment #2) > Looks fine, though what is the "===" operator? (you didn't add it - just > wondering though...) It's the identity (strict equality) operator. There is also a "not identity" operator: !== http://www.webreference.com/js/tips/991205.html Comment on attachment 13468 [details]
proposed patch
r=me
Committed revision 19959. |