{"action":"opened","number":73,"pull_request":{"created_at":"2011-12-09T16:33:11Z","review_comments":0,"state":"open","updated_at":"2011-12-09T16:33:11Z","changed_files":1,"_links":{"review_comments":{"href":"https://api.github.com/repos/andrewplummer/Sugar/pulls/73/comments"},"comments":{"href":"https://api.github.com/repos/andrewplummer/Sugar/issues/73/comments"},"html":{"href":"https://github.com/andrewplummer/Sugar/pull/73"},"self":{"href":"https://api.github.com/repos/andrewplummer/Sugar/pulls/73"}},"patch_url":"https://github.com/andrewplummer/Sugar/pull/73.patch","issue_url":"https://github.com/andrewplummer/Sugar/issues/73","user":{"gravatar_id":"6589c49345f4fec210c89b6a42d273ba","id":3035,"url":"https://api.github.com/users/milaniliev","avatar_url":"https://secure.gravatar.com/avatar/6589c49345f4fec210c89b6a42d273ba?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"milaniliev"},"comments":0,"merged":false,"body":"Hi,\r\n\r\nArray#reduce does not work as documented when 0 is given as an initialValue, since  `if(initialValue)`  is false for the value of 0. Instead, I propose we check for `null` & `undefined`.\r\n\r\nThis problem doesn't manifest itself in new browsers (i.e. Chrome 17) that implement Array#reduce natively; they handle a 0 initial value correctly.\r\n\r\nThanks!\r\nMilan","deletions":1,"commits":1,"mergeable":null,"id":577589,"additions":1,"base":{"repo":{"created_at":"2011-07-12T18:19:34Z","pushed_at":"2011-12-09T11:01:11Z","updated_at":"2011-12-09T16:06:56Z","private":false,"clone_url":"https://github.com/andrewplummer/Sugar.git","name":"Sugar","master_branch":null,"svn_url":"https://svn.github.com/andrewplummer/Sugar","watchers":589,"language":"JavaScript","forks":34,"owner":{"gravatar_id":"39255341a51574e9651b1094537e7683","id":74646,"url":"https://api.github.com/users/andrewplummer","avatar_url":"https://secure.gravatar.com/avatar/39255341a51574e9651b1094537e7683?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"andrewplummer"},"id":2037608,"homepage":"http://sugarjs.com/","description":"A Javascript library for working with native objects.","git_url":"git://github.com/andrewplummer/Sugar.git","html_url":"https://github.com/andrewplummer/Sugar","size":308,"url":"https://api.github.com/repos/andrewplummer/Sugar","open_issues":11,"fork":false,"ssh_url":"git@github.com:andrewplummer/Sugar.git"},"user":{"gravatar_id":"39255341a51574e9651b1094537e7683","id":74646,"url":"https://api.github.com/users/andrewplummer","avatar_url":"https://secure.gravatar.com/avatar/39255341a51574e9651b1094537e7683?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"andrewplummer"},"sha":"23fdb65223d0dbb63f6b285365d822f37d8b30a0","ref":"master","label":"andrewplummer:master"},"merged_by":null,"number":73,"head":{"repo":{"created_at":"2011-12-09T16:06:56Z","pushed_at":"2011-12-09T16:28:56Z","updated_at":"2011-12-09T16:28:59Z","private":false,"clone_url":"https://github.com/milaniliev/Sugar.git","name":"Sugar","master_branch":null,"svn_url":"https://svn.github.com/milaniliev/Sugar","watchers":1,"language":"JavaScript","forks":0,"owner":{"gravatar_id":"6589c49345f4fec210c89b6a42d273ba","id":3035,"url":"https://api.github.com/users/milaniliev","avatar_url":"https://secure.gravatar.com/avatar/6589c49345f4fec210c89b6a42d273ba?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"milaniliev"},"id":2948336,"homepage":"http://sugarjs.com/","description":"A Javascript library for working with native objects.","git_url":"git://github.com/milaniliev/Sugar.git","html_url":"https://github.com/milaniliev/Sugar","size":176,"url":"https://api.github.com/repos/milaniliev/Sugar","open_issues":0,"fork":true,"ssh_url":"git@github.com:milaniliev/Sugar.git"},"user":{"gravatar_id":"6589c49345f4fec210c89b6a42d273ba","id":3035,"url":"https://api.github.com/users/milaniliev","avatar_url":"https://secure.gravatar.com/avatar/6589c49345f4fec210c89b6a42d273ba?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"milaniliev"},"sha":"297cad71ac7df795f0388f53ca80ac75b3e9a648","ref":"master","label":"milaniliev:master"},"title":"Array#reduce does not follow semantics when 0 is given as initialValue","html_url":"https://github.com/andrewplummer/Sugar/pull/73","closed_at":null,"url":"https://api.github.com/repos/andrewplummer/Sugar/pulls/73","diff_url":"https://github.com/andrewplummer/Sugar/pull/73.diff","merged_at":null}}