{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/24796","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/24796/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/24796/comments","events_url":"https://api.github.com/repos/rails/rails/issues/24796/events","html_url":"https://github.com/rails/rails/issues/24796","id":152029803,"number":24796,"title":"[nil].sum returns 0","user":{"login":"mrkn","id":3959,"avatar_url":"https://avatars.githubusercontent.com/u/3959?v=3","gravatar_id":"","url":"https://api.github.com/users/mrkn","html_url":"https://github.com/mrkn","followers_url":"https://api.github.com/users/mrkn/followers","following_url":"https://api.github.com/users/mrkn/following{/other_user}","gists_url":"https://api.github.com/users/mrkn/gists{/gist_id}","starred_url":"https://api.github.com/users/mrkn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrkn/subscriptions","organizations_url":"https://api.github.com/users/mrkn/orgs","repos_url":"https://api.github.com/users/mrkn/repos","events_url":"https://api.github.com/users/mrkn/events{/privacy}","received_events_url":"https://api.github.com/users/mrkn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/activesupport","name":"activesupport","color":"FC9300"},{"url":"https://api.github.com/repos/rails/rails/labels/attached%20PR","name":"attached PR","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-30T13:16:47Z","updated_at":"2016-04-30T16:35:09Z","closed_at":null,"body":"Is this intentional?\r\n\r\n### Steps to reproduce\r\n\r\n```\r\n$ pwd\r\n/Users/mrkn/work/rails/master/activesupport\r\n$ git rev-parse --short HEAD\r\n151080a\r\n$ ruby -v -I lib -r active_support/core_ext/enumerable -e 'p [nil].sum'\r\nruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]\r\n0\r\n```\r\n\r\n### Expected behavior\r\n\r\nI don't have the idea what is expected, ideal behavior.\r\nBut `[nil].sum` raises TypeError on Ruby 2.4.\r\n\r\n```\r\n$ ruby -ve '[nil].sum'\r\nruby 2.4.0dev (2016-04-28 trunk 54810) [x86_64-darwin15]\r\n-e:1:in `+': nil can't be coerced into Fixnum (TypeError)\r\n\tfrom -e:1:in `sum'\r\n\tfrom -e:1:in `<main>'\r\n```\r\n\r\n### Actual behavior\r\n\r\nReturns 0.\r\n\r\n### System configuration\r\n**Rails version**: 151080a\r\n\r\n**Ruby version**: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/215977376","html_url":"https://github.com/rails/rails/issues/24796#issuecomment-215977376","issue_url":"https://api.github.com/repos/rails/rails/issues/24796","id":215977376,"user":{"login":"vipulnsward","id":567626,"avatar_url":"https://avatars.githubusercontent.com/u/567626?v=3","gravatar_id":"","url":"https://api.github.com/users/vipulnsward","html_url":"https://github.com/vipulnsward","followers_url":"https://api.github.com/users/vipulnsward/followers","following_url":"https://api.github.com/users/vipulnsward/following{/other_user}","gists_url":"https://api.github.com/users/vipulnsward/gists{/gist_id}","starred_url":"https://api.github.com/users/vipulnsward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipulnsward/subscriptions","organizations_url":"https://api.github.com/users/vipulnsward/orgs","repos_url":"https://api.github.com/users/vipulnsward/repos","events_url":"https://api.github.com/users/vipulnsward/events{/privacy}","received_events_url":"https://api.github.com/users/vipulnsward/received_events","type":"User","site_admin":false},"created_at":"2016-04-30T16:35:09Z","updated_at":"2016-04-30T16:35:09Z","body":"We don't have a specification for this. cc @jeremy \r\n\r\nRef: https://github.com/vipulnsward/rails/blob/7ad4690b2149fbb23faa179c21698b92ff383c73/activesupport/test/core_ext/enumerable_test.rb#L43-L58"}}