{"action":"created","comment":{"url":"https://api.github.com/repos/cesanta/v7/pulls/comments/24175424","id":24175424,"diff_hunk":"@@ -6,11 +6,13 @@\n #include \"internal.h\"\n \n static val_t Number_ctor(struct v7 *v7, val_t this_obj, val_t args) {\n-  val_t arg0 = v7_array_at(v7, args, 0);\n+  val_t arg0 = v7_array_length(v7, args) <= 0 ?\n+    v7_create_number(0.0) : v7_array_at(v7, args, 0);\n   val_t res = v7_is_double(arg0) ? arg0 : v7_create_number(i_as_num(v7, arg0));\n \n   if (v7_is_object(this_obj) && this_obj != v7->global_object) {\n     v7_to_object(this_obj)->prototype = v7_to_object(v7->number_prototype);\n+    v7_set_property(v7, this_obj, \"prototype\", 9, 0, v7->number_prototype);","path":"src/number.c","position":11,"original_position":11,"commit_id":"d636ab25e37b3da2a4b816b6e3e4c01e957efaed","original_commit_id":"d636ab25e37b3da2a4b816b6e3e4c01e957efaed","user":{"login":"cpq","id":601816,"avatar_url":"https://avatars.githubusercontent.com/u/601816?v=3","gravatar_id":"","url":"https://api.github.com/users/cpq","html_url":"https://github.com/cpq","followers_url":"https://api.github.com/users/cpq/followers","following_url":"https://api.github.com/users/cpq/following{/other_user}","gists_url":"https://api.github.com/users/cpq/gists{/gist_id}","starred_url":"https://api.github.com/users/cpq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpq/subscriptions","organizations_url":"https://api.github.com/users/cpq/orgs","repos_url":"https://api.github.com/users/cpq/repos","events_url":"https://api.github.com/users/cpq/events{/privacy}","received_events_url":"https://api.github.com/users/cpq/received_events","type":"User","site_admin":false},"body":"I don't know. Removed.","created_at":"2015-02-05T16:28:30Z","updated_at":"2015-02-05T16:28:30Z","html_url":"https://github.com/cesanta/v7/pull/223#discussion_r24175424","pull_request_url":"https://api.github.com/repos/cesanta/v7/pulls/223","_links":{"self":{"href":"https://api.github.com/repos/cesanta/v7/pulls/comments/24175424"},"html":{"href":"https://github.com/cesanta/v7/pull/223#discussion_r24175424"},"pull_request":{"href":"https://api.github.com/repos/cesanta/v7/pulls/223"}}},"pull_request":{"url":"https://api.github.com/repos/cesanta/v7/pulls/223","id":28714434,"html_url":"https://github.com/cesanta/v7/pull/223","diff_url":"https://github.com/cesanta/v7/pull/223.diff","patch_url":"https://github.com/cesanta/v7/pull/223.patch","issue_url":"https://api.github.com/repos/cesanta/v7/issues/223","number":223,"state":"open","locked":false,"title":"Fix Number ctor","user":{"login":"cpq","id":601816,"avatar_url":"https://avatars.githubusercontent.com/u/601816?v=3","gravatar_id":"","url":"https://api.github.com/users/cpq","html_url":"https://github.com/cpq","followers_url":"https://api.github.com/users/cpq/followers","following_url":"https://api.github.com/users/cpq/following{/other_user}","gists_url":"https://api.github.com/users/cpq/gists{/gist_id}","starred_url":"https://api.github.com/users/cpq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpq/subscriptions","organizations_url":"https://api.github.com/users/cpq/orgs","repos_url":"https://api.github.com/users/cpq/repos","events_url":"https://api.github.com/users/cpq/events{/privacy}","received_events_url":"https://api.github.com/users/cpq/received_events","type":"User","site_admin":false},"body":"Note: there is a regression.","created_at":"2015-02-05T10:42:57Z","updated_at":"2015-02-05T16:28:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a21000f10a778cca8f41a13b8d10e6beee02e921","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cesanta/v7/pulls/223/commits","review_comments_url":"https://api.github.com/repos/cesanta/v7/pulls/223/comments","review_comment_url":"https://api.github.com/repos/cesanta/v7/pulls/comments/{number}","comments_url":"https://api.github.com/repos/cesanta/v7/issues/223/comments","statuses_url":"https://api.github.com/repos/cesanta/v7/statuses/d636ab25e37b3da2a4b816b6e3e4c01e957efaed","head":{"label":"cesanta:number_ctor","ref":"number_ctor","sha":"d636ab25e37b3da2a4b816b6e3e4c01e957efaed","user":{"login":"cesanta","id":5111322,"avatar_url":"https://avatars.githubusercontent.com/u/5111322?v=3","gravatar_id":"","url":"https://api.github.com/users/cesanta","html_url":"https://github.com/cesanta","followers_url":"https://api.github.com/users/cesanta/followers","following_url":"https://api.github.com/users/cesanta/following{/other_user}","gists_url":"https://api.github.com/users/cesanta/gists{/gist_id}","starred_url":"https://api.github.com/users/cesanta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesanta/subscriptions","organizations_url":"https://api.github.com/users/cesanta/orgs","repos_url":"https://api.github.com/users/cesanta/repos","events_url":"https://api.github.com/users/cesanta/events{/privacy}","received_events_url":"https://api.github.com/users/cesanta/received_events","type":"Organization","site_admin":false},"repo":{"id":15176507,"name":"v7","full_name":"cesanta/v7","owner":{"login":"cesanta","id":5111322,"avatar_url":"https://avatars.githubusercontent.com/u/5111322?v=3","gravatar_id":"","url":"https://api.github.com/users/cesanta","html_url":"https://github.com/cesanta","followers_url":"https://api.github.com/users/cesanta/followers","following_url":"https://api.github.com/users/cesanta/following{/other_user}","gists_url":"https://api.github.com/users/cesanta/gists{/gist_id}","starred_url":"https://api.github.com/users/cesanta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesanta/subscriptions","organizations_url":"https://api.github.com/users/cesanta/orgs","repos_url":"https://api.github.com/users/cesanta/repos","events_url":"https://api.github.com/users/cesanta/events{/privacy}","received_events_url":"https://api.github.com/users/cesanta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cesanta/v7","description":"Embedded JavaScript engine for C/C++","fork":false,"url":"https://api.github.com/repos/cesanta/v7","forks_url":"https://api.github.com/repos/cesanta/v7/forks","keys_url":"https://api.github.com/repos/cesanta/v7/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cesanta/v7/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cesanta/v7/teams","hooks_url":"https://api.github.com/repos/cesanta/v7/hooks","issue_events_url":"https://api.github.com/repos/cesanta/v7/issues/events{/number}","events_url":"https://api.github.com/repos/cesanta/v7/events","assignees_url":"https://api.github.com/repos/cesanta/v7/assignees{/user}","branches_url":"https://api.github.com/repos/cesanta/v7/branches{/branch}","tags_url":"https://api.github.com/repos/cesanta/v7/tags","blobs_url":"https://api.github.com/repos/cesanta/v7/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cesanta/v7/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cesanta/v7/git/refs{/sha}","trees_url":"https://api.github.com/repos/cesanta/v7/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cesanta/v7/statuses/{sha}","languages_url":"https://api.github.com/repos/cesanta/v7/languages","stargazers_url":"https://api.github.com/repos/cesanta/v7/stargazers","contributors_url":"https://api.github.com/repos/cesanta/v7/contributors","subscribers_url":"https://api.github.com/repos/cesanta/v7/subscribers","subscription_url":"https://api.github.com/repos/cesanta/v7/subscription","commits_url":"https://api.github.com/repos/cesanta/v7/commits{/sha}","git_commits_url":"https://api.github.com/repos/cesanta/v7/git/commits{/sha}","comments_url":"https://api.github.com/repos/cesanta/v7/comments{/number}","issue_comment_url":"https://api.github.com/repos/cesanta/v7/issues/comments/{number}","contents_url":"https://api.github.com/repos/cesanta/v7/contents/{+path}","compare_url":"https://api.github.com/repos/cesanta/v7/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cesanta/v7/merges","archive_url":"https://api.github.com/repos/cesanta/v7/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cesanta/v7/downloads","issues_url":"https://api.github.com/repos/cesanta/v7/issues{/number}","pulls_url":"https://api.github.com/repos/cesanta/v7/pulls{/number}","milestones_url":"https://api.github.com/repos/cesanta/v7/milestones{/number}","notifications_url":"https://api.github.com/repos/cesanta/v7/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cesanta/v7/labels{/name}","releases_url":"https://api.github.com/repos/cesanta/v7/releases{/id}","created_at":"2013-12-13T23:28:04Z","updated_at":"2015-02-05T16:17:22Z","pushed_at":"2015-02-05T16:28:16Z","git_url":"git://github.com/cesanta/v7.git","ssh_url":"git@github.com:cesanta/v7.git","clone_url":"https://github.com/cesanta/v7.git","svn_url":"https://github.com/cesanta/v7","homepage":"","size":13839,"stargazers_count":54,"watchers_count":54,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":26,"forks":13,"open_issues":26,"watchers":54,"default_branch":"master"}},"base":{"label":"cesanta:master","ref":"master","sha":"56bfe5be9583dec2edae29300a22e01d7cc8020d","user":{"login":"cesanta","id":5111322,"avatar_url":"https://avatars.githubusercontent.com/u/5111322?v=3","gravatar_id":"","url":"https://api.github.com/users/cesanta","html_url":"https://github.com/cesanta","followers_url":"https://api.github.com/users/cesanta/followers","following_url":"https://api.github.com/users/cesanta/following{/other_user}","gists_url":"https://api.github.com/users/cesanta/gists{/gist_id}","starred_url":"https://api.github.com/users/cesanta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesanta/subscriptions","organizations_url":"https://api.github.com/users/cesanta/orgs","repos_url":"https://api.github.com/users/cesanta/repos","events_url":"https://api.github.com/users/cesanta/events{/privacy}","received_events_url":"https://api.github.com/users/cesanta/received_events","type":"Organization","site_admin":false},"repo":{"id":15176507,"name":"v7","full_name":"cesanta/v7","owner":{"login":"cesanta","id":5111322,"avatar_url":"https://avatars.githubusercontent.com/u/5111322?v=3","gravatar_id":"","url":"https://api.github.com/users/cesanta","html_url":"https://github.com/cesanta","followers_url":"https://api.github.com/users/cesanta/followers","following_url":"https://api.github.com/users/cesanta/following{/other_user}","gists_url":"https://api.github.com/users/cesanta/gists{/gist_id}","starred_url":"https://api.github.com/users/cesanta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesanta/subscriptions","organizations_url":"https://api.github.com/users/cesanta/orgs","repos_url":"https://api.github.com/users/cesanta/repos","events_url":"https://api.github.com/users/cesanta/events{/privacy}","received_events_url":"https://api.github.com/users/cesanta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cesanta/v7","description":"Embedded JavaScript engine for C/C++","fork":false,"url":"https://api.github.com/repos/cesanta/v7","forks_url":"https://api.github.com/repos/cesanta/v7/forks","keys_url":"https://api.github.com/repos/cesanta/v7/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cesanta/v7/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cesanta/v7/teams","hooks_url":"https://api.github.com/repos/cesanta/v7/hooks","issue_events_url":"https://api.github.com/repos/cesanta/v7/issues/events{/number}","events_url":"https://api.github.com/repos/cesanta/v7/events","assignees_url":"https://api.github.com/repos/cesanta/v7/assignees{/user}","branches_url":"https://api.github.com/repos/cesanta/v7/branches{/branch}","tags_url":"https://api.github.com/repos/cesanta/v7/tags","blobs_url":"https://api.github.com/repos/cesanta/v7/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cesanta/v7/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cesanta/v7/git/refs{/sha}","trees_url":"https://api.github.com/repos/cesanta/v7/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cesanta/v7/statuses/{sha}","languages_url":"https://api.github.com/repos/cesanta/v7/languages","stargazers_url":"https://api.github.com/repos/cesanta/v7/stargazers","contributors_url":"https://api.github.com/repos/cesanta/v7/contributors","subscribers_url":"https://api.github.com/repos/cesanta/v7/subscribers","subscription_url":"https://api.github.com/repos/cesanta/v7/subscription","commits_url":"https://api.github.com/repos/cesanta/v7/commits{/sha}","git_commits_url":"https://api.github.com/repos/cesanta/v7/git/commits{/sha}","comments_url":"https://api.github.com/repos/cesanta/v7/comments{/number}","issue_comment_url":"https://api.github.com/repos/cesanta/v7/issues/comments/{number}","contents_url":"https://api.github.com/repos/cesanta/v7/contents/{+path}","compare_url":"https://api.github.com/repos/cesanta/v7/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cesanta/v7/merges","archive_url":"https://api.github.com/repos/cesanta/v7/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cesanta/v7/downloads","issues_url":"https://api.github.com/repos/cesanta/v7/issues{/number}","pulls_url":"https://api.github.com/repos/cesanta/v7/pulls{/number}","milestones_url":"https://api.github.com/repos/cesanta/v7/milestones{/number}","notifications_url":"https://api.github.com/repos/cesanta/v7/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cesanta/v7/labels{/name}","releases_url":"https://api.github.com/repos/cesanta/v7/releases{/id}","created_at":"2013-12-13T23:28:04Z","updated_at":"2015-02-05T16:17:22Z","pushed_at":"2015-02-05T16:28:16Z","git_url":"git://github.com/cesanta/v7.git","ssh_url":"git@github.com:cesanta/v7.git","clone_url":"https://github.com/cesanta/v7.git","svn_url":"https://github.com/cesanta/v7","homepage":"","size":13839,"stargazers_count":54,"watchers_count":54,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":26,"forks":13,"open_issues":26,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cesanta/v7/pulls/223"},"html":{"href":"https://github.com/cesanta/v7/pull/223"},"issue":{"href":"https://api.github.com/repos/cesanta/v7/issues/223"},"comments":{"href":"https://api.github.com/repos/cesanta/v7/issues/223/comments"},"review_comments":{"href":"https://api.github.com/repos/cesanta/v7/pulls/223/comments"},"review_comment":{"href":"https://api.github.com/repos/cesanta/v7/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/cesanta/v7/pulls/223/commits"},"statuses":{"href":"https://api.github.com/repos/cesanta/v7/statuses/d636ab25e37b3da2a4b816b6e3e4c01e957efaed"}}}}