{"action":"created","issue":{"url":"https://api.github.com/repos/shouldjs/should.js/issues/99","labels_url":"https://api.github.com/repos/shouldjs/should.js/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/shouldjs/should.js/issues/99/comments","events_url":"https://api.github.com/repos/shouldjs/should.js/issues/99/events","html_url":"https://github.com/shouldjs/should.js/issues/99","id":128333951,"number":99,"title":"deepEqual throws for 0 === -0","user":{"login":"VinGarcia","id":5884418,"avatar_url":"https://avatars.githubusercontent.com/u/5884418?v=3","gravatar_id":"","url":"https://api.github.com/users/VinGarcia","html_url":"https://github.com/VinGarcia","followers_url":"https://api.github.com/users/VinGarcia/followers","following_url":"https://api.github.com/users/VinGarcia/following{/other_user}","gists_url":"https://api.github.com/users/VinGarcia/gists{/gist_id}","starred_url":"https://api.github.com/users/VinGarcia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VinGarcia/subscriptions","organizations_url":"https://api.github.com/users/VinGarcia/orgs","repos_url":"https://api.github.com/users/VinGarcia/repos","events_url":"https://api.github.com/users/VinGarcia/events{/privacy}","received_events_url":"https://api.github.com/users/VinGarcia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-23T15:27:51Z","updated_at":"2016-01-23T16:04:01Z","closed_at":null,"body":"I believe that this behavior is not intended, if it is, please mark this as resolved.\r\n\r\nWhen using should to compare 0 and -0 it throws an error when using `eql` or `equal`:\r\n\r\n```javascript\r\nrequire(should)\r\n(0).should.be.exactly(-0) // works\r\n(0 === -0).should.be.true() // works\r\n(0).should.eql(-0) // throws AssertionError: expected 0 to equal -0\r\n(0).should.equal(0) // also throws\r\n```\r\n\r\nIt also throws with deep comparisons:\r\n```javascript\r\n({ 'a' : [ [ [ 0 ] ] ] }).should.eql({ 'a' : [ [ [ -0 ] ] ] })\r\n```\r\n\r\nTested on 81e052a"},"comment":{"url":"https://api.github.com/repos/shouldjs/should.js/issues/comments/174196353","html_url":"https://github.com/shouldjs/should.js/issues/99#issuecomment-174196353","issue_url":"https://api.github.com/repos/shouldjs/should.js/issues/99","id":174196353,"user":{"login":"btd","id":334851,"avatar_url":"https://avatars.githubusercontent.com/u/334851?v=3","gravatar_id":"","url":"https://api.github.com/users/btd","html_url":"https://github.com/btd","followers_url":"https://api.github.com/users/btd/followers","following_url":"https://api.github.com/users/btd/following{/other_user}","gists_url":"https://api.github.com/users/btd/gists{/gist_id}","starred_url":"https://api.github.com/users/btd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btd/subscriptions","organizations_url":"https://api.github.com/users/btd/orgs","repos_url":"https://api.github.com/users/btd/repos","events_url":"https://api.github.com/users/btd/events{/privacy}","received_events_url":"https://api.github.com/users/btd/received_events","type":"User","site_admin":false},"created_at":"2016-01-23T16:04:01Z","updated_at":"2016-01-23T16:04:01Z","body":"Sorry. There is no easy way. Only if your override .eql yourself.\nYou can copy Assertion.prototype.eql and use Assertion.add to check first\nfor zeros and call old .eql. probably right idea to add setting to\nshould.config like with prototypes equality. I am going to add it tomorrow.\nSo you can wait for tomorrow.\nWDYT?\n23 Янв 2016 г. 18:53 пользователь \"Vinícius Garcia\" <\nnotifications@github.com> написал:\n\n> Is there a work around, if I want 0 to eql(0)?\n>\n> Because I am working with vectors (with sylvester.js), and sometimes they\n> return -0 instead of 0.\n>\n> I already found a way around but it's not very clean.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/shouldjs/should.js/issues/99#issuecomment-174195743>.\n>\n"}}