{"pull_request":{"state":"closed","deletions":1,"user":{"avatar_url":"https://secure.gravatar.com/avatar/91913f6ab8085bab0f2aa43995ba8ca2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"91913f6ab8085bab0f2aa43995ba8ca2","url":"https://api.github.com/users/bogdan","login":"bogdan","id":122436},"merged_by":null,"updated_at":"2011-11-17T18:27:13Z","base":{"ref":"master","user":{"avatar_url":"https://secure.gravatar.com/avatar/30f39a09e233e8369dddf6feb4be0308?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"30f39a09e233e8369dddf6feb4be0308","url":"https://api.github.com/users/rails","login":"rails","id":4223},"repo":{"name":"rails","master_branch":null,"pushed_at":"2011-11-17T15:10:11Z","fork":false,"updated_at":"2011-11-17T17:38:10Z","clone_url":"https://github.com/rails/rails.git","homepage":"http://rubyonrails.org","open_issues":601,"private":false,"language":"Ruby","forks":2399,"svn_url":"https://svn.github.com/rails/rails","url":"https://api.github.com/repos/rails/rails","owner":{"avatar_url":"https://secure.gravatar.com/avatar/30f39a09e233e8369dddf6feb4be0308?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"30f39a09e233e8369dddf6feb4be0308","url":"https://api.github.com/users/rails","login":"rails","id":4223},"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","size":39432,"id":8514,"watchers":11026,"git_url":"git://github.com/rails/rails.git","created_at":"2008-04-11T02:19:47Z","ssh_url":"git@github.com:rails/rails.git"},"label":"rails:master","sha":"1afe269a4aa18a815c509d3f0348ed99a9b4b560"},"closed_at":"2011-11-17T18:27:13Z","comments":3,"commits":1,"diff_url":"https://github.com/rails/rails/pull/3481.diff","head":{"ref":"concern","user":{"avatar_url":"https://secure.gravatar.com/avatar/91913f6ab8085bab0f2aa43995ba8ca2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"91913f6ab8085bab0f2aa43995ba8ca2","url":"https://api.github.com/users/bogdan","login":"bogdan","id":122436},"repo":{"name":"rails","master_branch":null,"pushed_at":"2011-11-15T08:40:19Z","fork":true,"updated_at":"2011-11-15T08:40:19Z","clone_url":"https://github.com/bogdan/rails.git","homepage":"http://rubyonrails.org","open_issues":0,"private":false,"language":"Ruby","forks":0,"svn_url":"https://svn.github.com/bogdan/rails","url":"https://api.github.com/repos/bogdan/rails","owner":{"avatar_url":"https://secure.gravatar.com/avatar/91913f6ab8085bab0f2aa43995ba8ca2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"91913f6ab8085bab0f2aa43995ba8ca2","url":"https://api.github.com/users/bogdan","login":"bogdan","id":122436},"html_url":"https://github.com/bogdan/rails","description":"Ruby on Rails","size":152,"id":1905872,"watchers":1,"git_url":"git://github.com/bogdan/rails.git","created_at":"2011-06-16T14:06:00Z","ssh_url":"git@github.com:bogdan/rails.git"},"label":"bogdan:concern","sha":"1bf5b11f795c6db77b698ace305acdac40403e7b"},"additions":26,"url":"https://api.github.com/repos/rails/rails/pulls/3481","merged":false,"merged_at":null,"body":"### Use case\r\n\r\nSuppose we have vendored module `A` (extended with `AS::Concern`). This module suppose to be included in class. We want this module to have some additional functionality from another module `B`. In this case I didn't find other way than alias-method-chain `self.included` (any suggestions?).\r\n\r\n### API\r\n\r\nAfter this patch we can just to do this:\r\n\r\n``` ruby\r\nA.included do\r\n  include B\r\nend\r\n```\r\n\r\nIn this case `B` will be included anytime when `A` got included.\r\n\r\n### Implementation\r\n\r\nI was thinking about 2 ways of doing it:\r\n\r\n* store all passed blocks in Array and iterate\r\n* merge new given block to previous by creating new block that calls both (see diff)\r\n\r\nDecided prefer second one because there is no performance impact when calling `.included` only once (as it works right now) - no additional objects, no additional method calls. \r\n\r\nThanks.","_links":{"comments":{"href":"https://api.github.com/repos/rails/rails/issues/3481/comments"},"html":{"href":"https://github.com/rails/rails/pull/3481"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/3481/comments"},"self":{"href":"https://api.github.com/repos/rails/rails/pulls/3481"}},"review_comments":0,"html_url":"https://github.com/rails/rails/pull/3481","issue_url":"https://github.com/rails/rails/issues/3481","title":"ActiveSupport::Concern: allow #included to be called multiple times","number":3481,"mergeable":true,"id":448895,"patch_url":"https://github.com/rails/rails/pull/3481.patch","changed_files":2,"created_at":"2011-10-31T15:27:43Z"},"action":"closed","number":3481}