{"action":"created","issue":{"url":"https://api.github.com/repos/iojs/io.js/issues/636","labels_url":"https://api.github.com/repos/iojs/io.js/issues/636/labels{/name}","comments_url":"https://api.github.com/repos/iojs/io.js/issues/636/comments","events_url":"https://api.github.com/repos/iojs/io.js/issues/636/events","html_url":"https://github.com/iojs/io.js/pull/636","id":55774247,"number":636,"title":"assert: don't compare object `prototype` property","user":{"login":"vkurchatkin","id":2993861,"avatar_url":"https://avatars.githubusercontent.com/u/2993861?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurchatkin","html_url":"https://github.com/vkurchatkin","followers_url":"https://api.github.com/users/vkurchatkin/followers","following_url":"https://api.github.com/users/vkurchatkin/following{/other_user}","gists_url":"https://api.github.com/users/vkurchatkin/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurchatkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurchatkin/subscriptions","organizations_url":"https://api.github.com/users/vkurchatkin/orgs","repos_url":"https://api.github.com/users/vkurchatkin/repos","events_url":"https://api.github.com/users/vkurchatkin/events{/privacy}","received_events_url":"https://api.github.com/users/vkurchatkin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-28T15:56:54Z","updated_at":"2015-02-01T15:06:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/iojs/io.js/pulls/636","html_url":"https://github.com/iojs/io.js/pull/636","diff_url":"https://github.com/iojs/io.js/pull/636.diff","patch_url":"https://github.com/iojs/io.js/pull/636.patch"},"body":"All own enumerable properties are compared already. Comparing `prototype` property specifically can cause weird behaviour.\r\n\r\nan alternative to #621\r\n\r\nExample:\r\n\r\n```javascript\r\nvar assert = require('assert');\r\nassert.deepEqual(Object.create({ a: 1 }), Object.create({ b: 2 }));\r\nassert.deepEqual(Object.create({ prototype: 1 }), Object.create({ prototype: 2 }));\r\n```\r\n\r\nThe first assertion is ok, the second throws. It is unexpected and has no logical explanation.\r\n\r\nChanged test was failing because of the following `nameBuilder2.prototype = Object;`. Not sure if it is a mistake, or a test for CommonJS bug.\r\n\r\nR=@iojs/collaborators \r\n"},"comment":{"url":"https://api.github.com/repos/iojs/io.js/issues/comments/72368230","html_url":"https://github.com/iojs/io.js/pull/636#issuecomment-72368230","issue_url":"https://api.github.com/repos/iojs/io.js/issues/636","id":72368230,"user":{"login":"seishun","id":988441,"avatar_url":"https://avatars.githubusercontent.com/u/988441?v=3","gravatar_id":"","url":"https://api.github.com/users/seishun","html_url":"https://github.com/seishun","followers_url":"https://api.github.com/users/seishun/followers","following_url":"https://api.github.com/users/seishun/following{/other_user}","gists_url":"https://api.github.com/users/seishun/gists{/gist_id}","starred_url":"https://api.github.com/users/seishun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seishun/subscriptions","organizations_url":"https://api.github.com/users/seishun/orgs","repos_url":"https://api.github.com/users/seishun/repos","events_url":"https://api.github.com/users/seishun/events{/privacy}","received_events_url":"https://api.github.com/users/seishun/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T15:06:12Z","updated_at":"2015-02-01T15:06:12Z","body":">node.js/io.js documentation never mentions that assert has anything to do with CommonJS;\r\n\r\nIt doesn't explain what \"deep equality\" means either, which makes it \"obvious\" that it uses the algorithm from the buggy and dead spec. Let's not follow ringojs in confusing users even more."}}