{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/35588938","id":35588938,"diff_hunk":"@@ -416,6 +421,10 @@ def search_for_file(path_suffix)\n     def autoloadable_module?(path_suffix)\n       autoload_paths.each do |load_path|\n         return load_path if File.directory? File.join(load_path, path_suffix)\n+        if load_path.to_s =~ /#{path_suffix}$/","path":"activesupport/lib/active_support/dependencies.rb","position":16,"original_position":16,"commit_id":"ddebb35e40c23cad35b810bca4884e2575d94b0f","original_commit_id":"ddebb35e40c23cad35b810bca4884e2575d94b0f","user":{"login":"byroot","id":44640,"avatar_url":"https://avatars.githubusercontent.com/u/44640?v=3","gravatar_id":"","url":"https://api.github.com/users/byroot","html_url":"https://github.com/byroot","followers_url":"https://api.github.com/users/byroot/followers","following_url":"https://api.github.com/users/byroot/following{/other_user}","gists_url":"https://api.github.com/users/byroot/gists{/gist_id}","starred_url":"https://api.github.com/users/byroot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byroot/subscriptions","organizations_url":"https://api.github.com/users/byroot/orgs","repos_url":"https://api.github.com/users/byroot/repos","events_url":"https://api.github.com/users/byroot/events{/privacy}","received_events_url":"https://api.github.com/users/byroot/received_events","type":"User","site_admin":false},"body":"Same here","created_at":"2015-07-27T21:23:15Z","updated_at":"2015-07-27T21:23:15Z","html_url":"https://github.com/rails/rails/pull/20789#discussion_r35588938","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/20789","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/35588938"},"html":{"href":"https://github.com/rails/rails/pull/20789#discussion_r35588938"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/20789"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/20789","id":39270895,"html_url":"https://github.com/rails/rails/pull/20789","diff_url":"https://github.com/rails/rails/pull/20789.diff","patch_url":"https://github.com/rails/rails/pull/20789.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/20789","number":20789,"state":"closed","locked":false,"title":"improve autoload_paths logic","user":{"login":"meinac","id":1840945,"avatar_url":"https://avatars.githubusercontent.com/u/1840945?v=3","gravatar_id":"","url":"https://api.github.com/users/meinac","html_url":"https://github.com/meinac","followers_url":"https://api.github.com/users/meinac/followers","following_url":"https://api.github.com/users/meinac/following{/other_user}","gists_url":"https://api.github.com/users/meinac/gists{/gist_id}","starred_url":"https://api.github.com/users/meinac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meinac/subscriptions","organizations_url":"https://api.github.com/users/meinac/orgs","repos_url":"https://api.github.com/users/meinac/repos","events_url":"https://api.github.com/users/meinac/events{/privacy}","received_events_url":"https://api.github.com/users/meinac/received_events","type":"User","site_admin":false},"body":"Normally in rails if you want to add a directory to autoload_paths which is under of the lib directory you have to add whole lib directory to autoload_paths. With this commit we can add only necessary directory into the autoload_paths.\r\nIn current behaviour if you add the directory into the autoload_paths like below;\r\n```ruby\r\n  config.autoload_paths << \"#{config.root}/lib/foo\"\r\n```\r\nrails can't load the files under the foo directory but now It can.","created_at":"2015-07-06T14:06:54Z","updated_at":"2015-07-27T21:23:15Z","closed_at":"2015-07-27T20:54:59Z","merged_at":null,"merge_commit_sha":"8e3fef688efe47e7a7e3be36e8326f6510227f36","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/20789/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/20789/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/20789/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/ddebb35e40c23cad35b810bca4884e2575d94b0f","head":{"label":"vngrs:improve_autoload_paths","ref":"improve_autoload_paths","sha":"ddebb35e40c23cad35b810bca4884e2575d94b0f","user":{"login":"vngrs","id":5415987,"avatar_url":"https://avatars.githubusercontent.com/u/5415987?v=3","gravatar_id":"","url":"https://api.github.com/users/vngrs","html_url":"https://github.com/vngrs","followers_url":"https://api.github.com/users/vngrs/followers","following_url":"https://api.github.com/users/vngrs/following{/other_user}","gists_url":"https://api.github.com/users/vngrs/gists{/gist_id}","starred_url":"https://api.github.com/users/vngrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vngrs/subscriptions","organizations_url":"https://api.github.com/users/vngrs/orgs","repos_url":"https://api.github.com/users/vngrs/repos","events_url":"https://api.github.com/users/vngrs/events{/privacy}","received_events_url":"https://api.github.com/users/vngrs/received_events","type":"Organization","site_admin":false},"repo":{"id":33334101,"name":"rails","full_name":"vngrs/rails","owner":{"login":"vngrs","id":5415987,"avatar_url":"https://avatars.githubusercontent.com/u/5415987?v=3","gravatar_id":"","url":"https://api.github.com/users/vngrs","html_url":"https://github.com/vngrs","followers_url":"https://api.github.com/users/vngrs/followers","following_url":"https://api.github.com/users/vngrs/following{/other_user}","gists_url":"https://api.github.com/users/vngrs/gists{/gist_id}","starred_url":"https://api.github.com/users/vngrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vngrs/subscriptions","organizations_url":"https://api.github.com/users/vngrs/orgs","repos_url":"https://api.github.com/users/vngrs/repos","events_url":"https://api.github.com/users/vngrs/events{/privacy}","received_events_url":"https://api.github.com/users/vngrs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vngrs/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/vngrs/rails","forks_url":"https://api.github.com/repos/vngrs/rails/forks","keys_url":"https://api.github.com/repos/vngrs/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vngrs/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vngrs/rails/teams","hooks_url":"https://api.github.com/repos/vngrs/rails/hooks","issue_events_url":"https://api.github.com/repos/vngrs/rails/issues/events{/number}","events_url":"https://api.github.com/repos/vngrs/rails/events","assignees_url":"https://api.github.com/repos/vngrs/rails/assignees{/user}","branches_url":"https://api.github.com/repos/vngrs/rails/branches{/branch}","tags_url":"https://api.github.com/repos/vngrs/rails/tags","blobs_url":"https://api.github.com/repos/vngrs/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vngrs/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vngrs/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/vngrs/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vngrs/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/vngrs/rails/languages","stargazers_url":"https://api.github.com/repos/vngrs/rails/stargazers","contributors_url":"https://api.github.com/repos/vngrs/rails/contributors","subscribers_url":"https://api.github.com/repos/vngrs/rails/subscribers","subscription_url":"https://api.github.com/repos/vngrs/rails/subscription","commits_url":"https://api.github.com/repos/vngrs/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/vngrs/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/vngrs/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/vngrs/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/vngrs/rails/contents/{+path}","compare_url":"https://api.github.com/repos/vngrs/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vngrs/rails/merges","archive_url":"https://api.github.com/repos/vngrs/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vngrs/rails/downloads","issues_url":"https://api.github.com/repos/vngrs/rails/issues{/number}","pulls_url":"https://api.github.com/repos/vngrs/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/vngrs/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/vngrs/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vngrs/rails/labels{/name}","releases_url":"https://api.github.com/repos/vngrs/rails/releases{/id}","created_at":"2015-04-02T22:05:32Z","updated_at":"2015-04-11T02:08:30Z","pushed_at":"2015-07-26T04:27:34Z","git_url":"git://github.com/vngrs/rails.git","ssh_url":"git@github.com:vngrs/rails.git","clone_url":"https://github.com/vngrs/rails.git","svn_url":"https://github.com/vngrs/rails","homepage":"http://rubyonrails.org","size":144488,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"094571b46dbc00a2db0bfcc96c38d984d2b675f3","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","created_at":"2008-04-11T02:19:47Z","updated_at":"2015-07-27T20:51:10Z","pushed_at":"2015-07-27T20:36:47Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":434357,"stargazers_count":27037,"watchers_count":27037,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10832,"mirror_url":null,"open_issues_count":873,"forks":10832,"open_issues":873,"watchers":27037,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/20789"},"html":{"href":"https://github.com/rails/rails/pull/20789"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/20789"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/20789/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/20789/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/20789/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/ddebb35e40c23cad35b810bca4884e2575d94b0f"}}}}