{"action":"created","comment":{"url":"https://api.github.com/repos/es-shims/es5-shim/pulls/comments/44877660","id":44877660,"diff_hunk":"@@ -329,6 +360,97 @@ var strSplit = call.bind(StringPrototype.split);\n var strIndexOf = call.bind(StringPrototype.indexOf);\n var push = call.bind(array_push);\n \n+// ES-5 15.3.4.4\n+// http://es5.github.io/#x15.3.4.4\n+var hasToStringTagBasicBug = !(toStr() === '[object Undefined]' && toStr(null) === '[object Null]');\n+var hasToStringTagArgumentsBug = toStr(function () {\n+  return arguments;\n+}) !== '[object Arguments]';\n+var hasToStringTagArrayBug = toStr([]) !== '[object Array]';\n+var hasToStringTagRegExpBug = toStr(/test/) !== '[object RegExp]';\n+var hasToStringTagBug = hasToStringTagBasicBug ||\n+    hasToStringTagArgumentsBug ||\n+    hasToStringTagArrayBug ||\n+    hasToStringTagRegExpBug;\n+\n+// Other to check:\n+// Safari 8 returns 'object' for typed array constructors-\n+// PhantomJS 1.9 which returns 'function' for `NodeList` instances.\n+\n+if (hasToStringTagArgumentsBug) {\n+  var isDuckTypeArguments = function (value) {\n+    /*jshint eqnull:true */\n+    return value != null &&\n+        typeof value === 'object' &&\n+        owns(value, 'length') &&\n+        typeof value.length === 'number' &&\n+        value.length >= 0 &&\n+        owns(value, 'callee') &&\n+        isCallable(value.callee) &&\n+        !owns(value, 'arguments');\n+\n+  };\n+}\n+\n+if (hasToStringTagArrayBug) {\n+  var isDuckTypeArray = function (value) {\n+    /*jshint eqnull:true */\n+    return value != null &&\n+        typeof value === 'object' &&\n+        owns(value, 'length') &&\n+        typeof value.length === 'number' &&\n+        value.length >= 0 &&\n+        !owns(value, 'callee') &&\n+        !owns(value, 'arguments');\n+  };\n+}\n+\n+if (hasToStringTagRegExpBug) {\n+  var isDuckTypeRegExp = function (value) {\n+    /*jshint eqnull:true */\n+    if (value != null) {\n+      var type = typeof value;\n+      if (type === 'object' || type === 'function') {\n+        try {\n+          regexExec.call(value);","path":"es5-shim.js","position":98,"original_position":101,"commit_id":"64dee1a833b35563dad3cb8aaee28700f9bdafcf","original_commit_id":"d4c6c07c599fe82507155347b7091f4efbdf8b62","user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"body":"Any `.call` will fail if `Function.prototype.call` is later broken or nonexistent","created_at":"2015-11-15T21:18:50Z","updated_at":"2015-11-15T21:18:50Z","html_url":"https://github.com/es-shims/es5-shim/pull/345#discussion_r44877660","pull_request_url":"https://api.github.com/repos/es-shims/es5-shim/pulls/345","_links":{"self":{"href":"https://api.github.com/repos/es-shims/es5-shim/pulls/comments/44877660"},"html":{"href":"https://github.com/es-shims/es5-shim/pull/345#discussion_r44877660"},"pull_request":{"href":"https://api.github.com/repos/es-shims/es5-shim/pulls/345"}}},"pull_request":{"url":"https://api.github.com/repos/es-shims/es5-shim/pulls/345","id":50754223,"html_url":"https://github.com/es-shims/es5-shim/pull/345","diff_url":"https://github.com/es-shims/es5-shim/pull/345.diff","patch_url":"https://github.com/es-shims/es5-shim/pull/345.patch","issue_url":"https://api.github.com/repos/es-shims/es5-shim/issues/345","number":345,"state":"open","locked":false,"title":"Fix `Function.prototype.call` and tests.","user":{"login":"Xotic750","id":216041,"avatar_url":"https://avatars.githubusercontent.com/u/216041?v=3","gravatar_id":"","url":"https://api.github.com/users/Xotic750","html_url":"https://github.com/Xotic750","followers_url":"https://api.github.com/users/Xotic750/followers","following_url":"https://api.github.com/users/Xotic750/following{/other_user}","gists_url":"https://api.github.com/users/Xotic750/gists{/gist_id}","starred_url":"https://api.github.com/users/Xotic750/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xotic750/subscriptions","organizations_url":"https://api.github.com/users/Xotic750/orgs","repos_url":"https://api.github.com/users/Xotic750/repos","events_url":"https://api.github.com/users/Xotic750/events{/privacy}","received_events_url":"https://api.github.com/users/Xotic750/received_events","type":"User","site_admin":false},"body":"Ref: https://github.com/es-shims/es5-shim/issues/304\r\n\r\nThis is not necessarily ready to pull, but I want for the tests to be run.","created_at":"2015-11-15T19:45:46Z","updated_at":"2015-11-15T21:18:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66bfd7b36dcea0d0cafe03b17052d04662f6fe01","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/es-shims/es5-shim/pulls/345/commits","review_comments_url":"https://api.github.com/repos/es-shims/es5-shim/pulls/345/comments","review_comment_url":"https://api.github.com/repos/es-shims/es5-shim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/es-shims/es5-shim/issues/345/comments","statuses_url":"https://api.github.com/repos/es-shims/es5-shim/statuses/64dee1a833b35563dad3cb8aaee28700f9bdafcf","head":{"label":"Xotic750:call","ref":"call","sha":"64dee1a833b35563dad3cb8aaee28700f9bdafcf","user":{"login":"Xotic750","id":216041,"avatar_url":"https://avatars.githubusercontent.com/u/216041?v=3","gravatar_id":"","url":"https://api.github.com/users/Xotic750","html_url":"https://github.com/Xotic750","followers_url":"https://api.github.com/users/Xotic750/followers","following_url":"https://api.github.com/users/Xotic750/following{/other_user}","gists_url":"https://api.github.com/users/Xotic750/gists{/gist_id}","starred_url":"https://api.github.com/users/Xotic750/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xotic750/subscriptions","organizations_url":"https://api.github.com/users/Xotic750/orgs","repos_url":"https://api.github.com/users/Xotic750/repos","events_url":"https://api.github.com/users/Xotic750/events{/privacy}","received_events_url":"https://api.github.com/users/Xotic750/received_events","type":"User","site_admin":false},"repo":{"id":16054066,"name":"es5-shim","full_name":"Xotic750/es5-shim","owner":{"login":"Xotic750","id":216041,"avatar_url":"https://avatars.githubusercontent.com/u/216041?v=3","gravatar_id":"","url":"https://api.github.com/users/Xotic750","html_url":"https://github.com/Xotic750","followers_url":"https://api.github.com/users/Xotic750/followers","following_url":"https://api.github.com/users/Xotic750/following{/other_user}","gists_url":"https://api.github.com/users/Xotic750/gists{/gist_id}","starred_url":"https://api.github.com/users/Xotic750/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xotic750/subscriptions","organizations_url":"https://api.github.com/users/Xotic750/orgs","repos_url":"https://api.github.com/users/Xotic750/repos","events_url":"https://api.github.com/users/Xotic750/events{/privacy}","received_events_url":"https://api.github.com/users/Xotic750/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Xotic750/es5-shim","description":"ECMAScript 5 compatibility shims for legacy JavaScript engines","fork":true,"url":"https://api.github.com/repos/Xotic750/es5-shim","forks_url":"https://api.github.com/repos/Xotic750/es5-shim/forks","keys_url":"https://api.github.com/repos/Xotic750/es5-shim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Xotic750/es5-shim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Xotic750/es5-shim/teams","hooks_url":"https://api.github.com/repos/Xotic750/es5-shim/hooks","issue_events_url":"https://api.github.com/repos/Xotic750/es5-shim/issues/events{/number}","events_url":"https://api.github.com/repos/Xotic750/es5-shim/events","assignees_url":"https://api.github.com/repos/Xotic750/es5-shim/assignees{/user}","branches_url":"https://api.github.com/repos/Xotic750/es5-shim/branches{/branch}","tags_url":"https://api.github.com/repos/Xotic750/es5-shim/tags","blobs_url":"https://api.github.com/repos/Xotic750/es5-shim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Xotic750/es5-shim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Xotic750/es5-shim/git/refs{/sha}","trees_url":"https://api.github.com/repos/Xotic750/es5-shim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Xotic750/es5-shim/statuses/{sha}","languages_url":"https://api.github.com/repos/Xotic750/es5-shim/languages","stargazers_url":"https://api.github.com/repos/Xotic750/es5-shim/stargazers","contributors_url":"https://api.github.com/repos/Xotic750/es5-shim/contributors","subscribers_url":"https://api.github.com/repos/Xotic750/es5-shim/subscribers","subscription_url":"https://api.github.com/repos/Xotic750/es5-shim/subscription","commits_url":"https://api.github.com/repos/Xotic750/es5-shim/commits{/sha}","git_commits_url":"https://api.github.com/repos/Xotic750/es5-shim/git/commits{/sha}","comments_url":"https://api.github.com/repos/Xotic750/es5-shim/comments{/number}","issue_comment_url":"https://api.github.com/repos/Xotic750/es5-shim/issues/comments{/number}","contents_url":"https://api.github.com/repos/Xotic750/es5-shim/contents/{+path}","compare_url":"https://api.github.com/repos/Xotic750/es5-shim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Xotic750/es5-shim/merges","archive_url":"https://api.github.com/repos/Xotic750/es5-shim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Xotic750/es5-shim/downloads","issues_url":"https://api.github.com/repos/Xotic750/es5-shim/issues{/number}","pulls_url":"https://api.github.com/repos/Xotic750/es5-shim/pulls{/number}","milestones_url":"https://api.github.com/repos/Xotic750/es5-shim/milestones{/number}","notifications_url":"https://api.github.com/repos/Xotic750/es5-shim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Xotic750/es5-shim/labels{/name}","releases_url":"https://api.github.com/repos/Xotic750/es5-shim/releases{/id}","created_at":"2014-01-19T20:49:27Z","updated_at":"2015-11-15T15:18:02Z","pushed_at":"2015-11-15T21:14:56Z","git_url":"git://github.com/Xotic750/es5-shim.git","ssh_url":"git@github.com:Xotic750/es5-shim.git","clone_url":"https://github.com/Xotic750/es5-shim.git","svn_url":"https://github.com/Xotic750/es5-shim","homepage":"","size":1440,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"es-shims:master","ref":"master","sha":"4b6dcad13bbf64504b637d5aa448ae2414c7f7e0","user":{"login":"es-shims","id":6288429,"avatar_url":"https://avatars.githubusercontent.com/u/6288429?v=3","gravatar_id":"","url":"https://api.github.com/users/es-shims","html_url":"https://github.com/es-shims","followers_url":"https://api.github.com/users/es-shims/followers","following_url":"https://api.github.com/users/es-shims/following{/other_user}","gists_url":"https://api.github.com/users/es-shims/gists{/gist_id}","starred_url":"https://api.github.com/users/es-shims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/es-shims/subscriptions","organizations_url":"https://api.github.com/users/es-shims/orgs","repos_url":"https://api.github.com/users/es-shims/repos","events_url":"https://api.github.com/users/es-shims/events{/privacy}","received_events_url":"https://api.github.com/users/es-shims/received_events","type":"Organization","site_admin":false},"repo":{"id":914603,"name":"es5-shim","full_name":"es-shims/es5-shim","owner":{"login":"es-shims","id":6288429,"avatar_url":"https://avatars.githubusercontent.com/u/6288429?v=3","gravatar_id":"","url":"https://api.github.com/users/es-shims","html_url":"https://github.com/es-shims","followers_url":"https://api.github.com/users/es-shims/followers","following_url":"https://api.github.com/users/es-shims/following{/other_user}","gists_url":"https://api.github.com/users/es-shims/gists{/gist_id}","starred_url":"https://api.github.com/users/es-shims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/es-shims/subscriptions","organizations_url":"https://api.github.com/users/es-shims/orgs","repos_url":"https://api.github.com/users/es-shims/repos","events_url":"https://api.github.com/users/es-shims/events{/privacy}","received_events_url":"https://api.github.com/users/es-shims/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/es-shims/es5-shim","description":"ECMAScript 5 compatibility shims for legacy JavaScript engines","fork":false,"url":"https://api.github.com/repos/es-shims/es5-shim","forks_url":"https://api.github.com/repos/es-shims/es5-shim/forks","keys_url":"https://api.github.com/repos/es-shims/es5-shim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/es-shims/es5-shim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/es-shims/es5-shim/teams","hooks_url":"https://api.github.com/repos/es-shims/es5-shim/hooks","issue_events_url":"https://api.github.com/repos/es-shims/es5-shim/issues/events{/number}","events_url":"https://api.github.com/repos/es-shims/es5-shim/events","assignees_url":"https://api.github.com/repos/es-shims/es5-shim/assignees{/user}","branches_url":"https://api.github.com/repos/es-shims/es5-shim/branches{/branch}","tags_url":"https://api.github.com/repos/es-shims/es5-shim/tags","blobs_url":"https://api.github.com/repos/es-shims/es5-shim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/es-shims/es5-shim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/es-shims/es5-shim/git/refs{/sha}","trees_url":"https://api.github.com/repos/es-shims/es5-shim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/es-shims/es5-shim/statuses/{sha}","languages_url":"https://api.github.com/repos/es-shims/es5-shim/languages","stargazers_url":"https://api.github.com/repos/es-shims/es5-shim/stargazers","contributors_url":"https://api.github.com/repos/es-shims/es5-shim/contributors","subscribers_url":"https://api.github.com/repos/es-shims/es5-shim/subscribers","subscription_url":"https://api.github.com/repos/es-shims/es5-shim/subscription","commits_url":"https://api.github.com/repos/es-shims/es5-shim/commits{/sha}","git_commits_url":"https://api.github.com/repos/es-shims/es5-shim/git/commits{/sha}","comments_url":"https://api.github.com/repos/es-shims/es5-shim/comments{/number}","issue_comment_url":"https://api.github.com/repos/es-shims/es5-shim/issues/comments{/number}","contents_url":"https://api.github.com/repos/es-shims/es5-shim/contents/{+path}","compare_url":"https://api.github.com/repos/es-shims/es5-shim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/es-shims/es5-shim/merges","archive_url":"https://api.github.com/repos/es-shims/es5-shim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/es-shims/es5-shim/downloads","issues_url":"https://api.github.com/repos/es-shims/es5-shim/issues{/number}","pulls_url":"https://api.github.com/repos/es-shims/es5-shim/pulls{/number}","milestones_url":"https://api.github.com/repos/es-shims/es5-shim/milestones{/number}","notifications_url":"https://api.github.com/repos/es-shims/es5-shim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/es-shims/es5-shim/labels{/name}","releases_url":"https://api.github.com/repos/es-shims/es5-shim/releases{/id}","created_at":"2010-09-16T05:54:16Z","updated_at":"2015-11-15T16:52:40Z","pushed_at":"2015-11-15T21:14:57Z","git_url":"git://github.com/es-shims/es5-shim.git","ssh_url":"git@github.com:es-shims/es5-shim.git","clone_url":"https://github.com/es-shims/es5-shim.git","svn_url":"https://github.com/es-shims/es5-shim","homepage":"","size":3372,"stargazers_count":4341,"watchers_count":4341,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":593,"mirror_url":null,"open_issues_count":25,"forks":593,"open_issues":25,"watchers":4341,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/es-shims/es5-shim/pulls/345"},"html":{"href":"https://github.com/es-shims/es5-shim/pull/345"},"issue":{"href":"https://api.github.com/repos/es-shims/es5-shim/issues/345"},"comments":{"href":"https://api.github.com/repos/es-shims/es5-shim/issues/345/comments"},"review_comments":{"href":"https://api.github.com/repos/es-shims/es5-shim/pulls/345/comments"},"review_comment":{"href":"https://api.github.com/repos/es-shims/es5-shim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/es-shims/es5-shim/pulls/345/commits"},"statuses":{"href":"https://api.github.com/repos/es-shims/es5-shim/statuses/64dee1a833b35563dad3cb8aaee28700f9bdafcf"}}}}