{"action":"created","comment":{"url":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/comments/34965864","id":34965864,"diff_hunk":"@@ -736,8 +736,19 @@ def require_core_extensions\n \n       return if configuration.disable_core_monkey_patch\n \n-      # Needed to avoid active_support bug serializing JSONs.\n-      require 'rollbar/core_ext/basic_socket'\n+      # Needed to avoid active_support (< 4.1.0) bug serializing JSONs\n+      require 'rollbar/core_ext/basic_socket' if monkey_patch_socket?\n+    end\n+\n+    def monkey_patch_socket?\n+      return false unless defined(ActiveSupport::VERSION::STRING)\n+\n+      major, minor = ActiveSupport::VERSION::STRING.split('.').map(&:to_i)\n+\n+      return true if major == 3\n+      return true if major == 4 && minor == 0","path":"lib/rollbar.rb","position":16,"original_position":16,"commit_id":"415108d64e1254ec20ad2030c87e06b0a61f4a2d","original_commit_id":"415108d64e1254ec20ad2030c87e06b0a61f4a2d","user":{"login":"joneslee85","id":135605,"avatar_url":"https://avatars.githubusercontent.com/u/135605?v=3","gravatar_id":"","url":"https://api.github.com/users/joneslee85","html_url":"https://github.com/joneslee85","followers_url":"https://api.github.com/users/joneslee85/followers","following_url":"https://api.github.com/users/joneslee85/following{/other_user}","gists_url":"https://api.github.com/users/joneslee85/gists{/gist_id}","starred_url":"https://api.github.com/users/joneslee85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joneslee85/subscriptions","organizations_url":"https://api.github.com/users/joneslee85/orgs","repos_url":"https://api.github.com/users/joneslee85/repos","events_url":"https://api.github.com/users/joneslee85/events{/privacy}","received_events_url":"https://api.github.com/users/joneslee85/received_events","type":"User","site_admin":false},"body":"what do you think about consolidating 748 and 749 into 1 line?","created_at":"2015-07-20T02:10:13Z","updated_at":"2015-07-20T02:10:13Z","html_url":"https://github.com/rollbar/rollbar-gem/pull/261#discussion_r34965864","pull_request_url":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/261","_links":{"self":{"href":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/comments/34965864"},"html":{"href":"https://github.com/rollbar/rollbar-gem/pull/261#discussion_r34965864"},"pull_request":{"href":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/261"}}},"pull_request":{"url":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/261","id":40261007,"html_url":"https://github.com/rollbar/rollbar-gem/pull/261","diff_url":"https://github.com/rollbar/rollbar-gem/pull/261.diff","patch_url":"https://github.com/rollbar/rollbar-gem/pull/261.patch","issue_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/261","number":261,"state":"open","locked":false,"title":"Monkey patch BasicSocket just for active_support < 4.1.0.","user":{"login":"jondeandres","id":122581,"avatar_url":"https://avatars.githubusercontent.com/u/122581?v=3","gravatar_id":"","url":"https://api.github.com/users/jondeandres","html_url":"https://github.com/jondeandres","followers_url":"https://api.github.com/users/jondeandres/followers","following_url":"https://api.github.com/users/jondeandres/following{/other_user}","gists_url":"https://api.github.com/users/jondeandres/gists{/gist_id}","starred_url":"https://api.github.com/users/jondeandres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jondeandres/subscriptions","organizations_url":"https://api.github.com/users/jondeandres/orgs","repos_url":"https://api.github.com/users/jondeandres/repos","events_url":"https://api.github.com/users/jondeandres/events{/privacy}","received_events_url":"https://api.github.com/users/jondeandres/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-17T18:57:11Z","updated_at":"2015-07-20T02:10:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"524abb50baf2882ef2f69a7ce4567ca9a449daee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/261/commits","review_comments_url":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/261/comments","review_comment_url":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/261/comments","statuses_url":"https://api.github.com/repos/rollbar/rollbar-gem/statuses/415108d64e1254ec20ad2030c87e06b0a61f4a2d","head":{"label":"rollbar:fix-monkey-patch","ref":"fix-monkey-patch","sha":"415108d64e1254ec20ad2030c87e06b0a61f4a2d","user":{"login":"rollbar","id":3219584,"avatar_url":"https://avatars.githubusercontent.com/u/3219584?v=3","gravatar_id":"","url":"https://api.github.com/users/rollbar","html_url":"https://github.com/rollbar","followers_url":"https://api.github.com/users/rollbar/followers","following_url":"https://api.github.com/users/rollbar/following{/other_user}","gists_url":"https://api.github.com/users/rollbar/gists{/gist_id}","starred_url":"https://api.github.com/users/rollbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rollbar/subscriptions","organizations_url":"https://api.github.com/users/rollbar/orgs","repos_url":"https://api.github.com/users/rollbar/repos","events_url":"https://api.github.com/users/rollbar/events{/privacy}","received_events_url":"https://api.github.com/users/rollbar/received_events","type":"Organization","site_admin":false},"repo":{"id":5556347,"name":"rollbar-gem","full_name":"rollbar/rollbar-gem","owner":{"login":"rollbar","id":3219584,"avatar_url":"https://avatars.githubusercontent.com/u/3219584?v=3","gravatar_id":"","url":"https://api.github.com/users/rollbar","html_url":"https://github.com/rollbar","followers_url":"https://api.github.com/users/rollbar/followers","following_url":"https://api.github.com/users/rollbar/following{/other_user}","gists_url":"https://api.github.com/users/rollbar/gists{/gist_id}","starred_url":"https://api.github.com/users/rollbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rollbar/subscriptions","organizations_url":"https://api.github.com/users/rollbar/orgs","repos_url":"https://api.github.com/users/rollbar/repos","events_url":"https://api.github.com/users/rollbar/events{/privacy}","received_events_url":"https://api.github.com/users/rollbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rollbar/rollbar-gem","description":"Exception tracking and logging from Ruby to Rollbar","fork":false,"url":"https://api.github.com/repos/rollbar/rollbar-gem","forks_url":"https://api.github.com/repos/rollbar/rollbar-gem/forks","keys_url":"https://api.github.com/repos/rollbar/rollbar-gem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rollbar/rollbar-gem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rollbar/rollbar-gem/teams","hooks_url":"https://api.github.com/repos/rollbar/rollbar-gem/hooks","issue_events_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/events{/number}","events_url":"https://api.github.com/repos/rollbar/rollbar-gem/events","assignees_url":"https://api.github.com/repos/rollbar/rollbar-gem/assignees{/user}","branches_url":"https://api.github.com/repos/rollbar/rollbar-gem/branches{/branch}","tags_url":"https://api.github.com/repos/rollbar/rollbar-gem/tags","blobs_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/refs{/sha}","trees_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rollbar/rollbar-gem/statuses/{sha}","languages_url":"https://api.github.com/repos/rollbar/rollbar-gem/languages","stargazers_url":"https://api.github.com/repos/rollbar/rollbar-gem/stargazers","contributors_url":"https://api.github.com/repos/rollbar/rollbar-gem/contributors","subscribers_url":"https://api.github.com/repos/rollbar/rollbar-gem/subscribers","subscription_url":"https://api.github.com/repos/rollbar/rollbar-gem/subscription","commits_url":"https://api.github.com/repos/rollbar/rollbar-gem/commits{/sha}","git_commits_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/commits{/sha}","comments_url":"https://api.github.com/repos/rollbar/rollbar-gem/comments{/number}","issue_comment_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/comments{/number}","contents_url":"https://api.github.com/repos/rollbar/rollbar-gem/contents/{+path}","compare_url":"https://api.github.com/repos/rollbar/rollbar-gem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rollbar/rollbar-gem/merges","archive_url":"https://api.github.com/repos/rollbar/rollbar-gem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rollbar/rollbar-gem/downloads","issues_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues{/number}","pulls_url":"https://api.github.com/repos/rollbar/rollbar-gem/pulls{/number}","milestones_url":"https://api.github.com/repos/rollbar/rollbar-gem/milestones{/number}","notifications_url":"https://api.github.com/repos/rollbar/rollbar-gem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rollbar/rollbar-gem/labels{/name}","releases_url":"https://api.github.com/repos/rollbar/rollbar-gem/releases{/id}","created_at":"2012-08-26T01:00:16Z","updated_at":"2015-07-18T15:24:58Z","pushed_at":"2015-07-17T18:57:11Z","git_url":"git://github.com/rollbar/rollbar-gem.git","ssh_url":"git@github.com:rollbar/rollbar-gem.git","clone_url":"https://github.com/rollbar/rollbar-gem.git","svn_url":"https://github.com/rollbar/rollbar-gem","homepage":"https://rollbar.com/docs/","size":3719,"stargazers_count":92,"watchers_count":92,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":32,"forks":87,"open_issues":32,"watchers":92,"default_branch":"master"}},"base":{"label":"rollbar:master","ref":"master","sha":"3c7028c91b4a3e91086a99c756952f19aea000f7","user":{"login":"rollbar","id":3219584,"avatar_url":"https://avatars.githubusercontent.com/u/3219584?v=3","gravatar_id":"","url":"https://api.github.com/users/rollbar","html_url":"https://github.com/rollbar","followers_url":"https://api.github.com/users/rollbar/followers","following_url":"https://api.github.com/users/rollbar/following{/other_user}","gists_url":"https://api.github.com/users/rollbar/gists{/gist_id}","starred_url":"https://api.github.com/users/rollbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rollbar/subscriptions","organizations_url":"https://api.github.com/users/rollbar/orgs","repos_url":"https://api.github.com/users/rollbar/repos","events_url":"https://api.github.com/users/rollbar/events{/privacy}","received_events_url":"https://api.github.com/users/rollbar/received_events","type":"Organization","site_admin":false},"repo":{"id":5556347,"name":"rollbar-gem","full_name":"rollbar/rollbar-gem","owner":{"login":"rollbar","id":3219584,"avatar_url":"https://avatars.githubusercontent.com/u/3219584?v=3","gravatar_id":"","url":"https://api.github.com/users/rollbar","html_url":"https://github.com/rollbar","followers_url":"https://api.github.com/users/rollbar/followers","following_url":"https://api.github.com/users/rollbar/following{/other_user}","gists_url":"https://api.github.com/users/rollbar/gists{/gist_id}","starred_url":"https://api.github.com/users/rollbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rollbar/subscriptions","organizations_url":"https://api.github.com/users/rollbar/orgs","repos_url":"https://api.github.com/users/rollbar/repos","events_url":"https://api.github.com/users/rollbar/events{/privacy}","received_events_url":"https://api.github.com/users/rollbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rollbar/rollbar-gem","description":"Exception tracking and logging from Ruby to Rollbar","fork":false,"url":"https://api.github.com/repos/rollbar/rollbar-gem","forks_url":"https://api.github.com/repos/rollbar/rollbar-gem/forks","keys_url":"https://api.github.com/repos/rollbar/rollbar-gem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rollbar/rollbar-gem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rollbar/rollbar-gem/teams","hooks_url":"https://api.github.com/repos/rollbar/rollbar-gem/hooks","issue_events_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/events{/number}","events_url":"https://api.github.com/repos/rollbar/rollbar-gem/events","assignees_url":"https://api.github.com/repos/rollbar/rollbar-gem/assignees{/user}","branches_url":"https://api.github.com/repos/rollbar/rollbar-gem/branches{/branch}","tags_url":"https://api.github.com/repos/rollbar/rollbar-gem/tags","blobs_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/refs{/sha}","trees_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rollbar/rollbar-gem/statuses/{sha}","languages_url":"https://api.github.com/repos/rollbar/rollbar-gem/languages","stargazers_url":"https://api.github.com/repos/rollbar/rollbar-gem/stargazers","contributors_url":"https://api.github.com/repos/rollbar/rollbar-gem/contributors","subscribers_url":"https://api.github.com/repos/rollbar/rollbar-gem/subscribers","subscription_url":"https://api.github.com/repos/rollbar/rollbar-gem/subscription","commits_url":"https://api.github.com/repos/rollbar/rollbar-gem/commits{/sha}","git_commits_url":"https://api.github.com/repos/rollbar/rollbar-gem/git/commits{/sha}","comments_url":"https://api.github.com/repos/rollbar/rollbar-gem/comments{/number}","issue_comment_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/comments{/number}","contents_url":"https://api.github.com/repos/rollbar/rollbar-gem/contents/{+path}","compare_url":"https://api.github.com/repos/rollbar/rollbar-gem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rollbar/rollbar-gem/merges","archive_url":"https://api.github.com/repos/rollbar/rollbar-gem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rollbar/rollbar-gem/downloads","issues_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues{/number}","pulls_url":"https://api.github.com/repos/rollbar/rollbar-gem/pulls{/number}","milestones_url":"https://api.github.com/repos/rollbar/rollbar-gem/milestones{/number}","notifications_url":"https://api.github.com/repos/rollbar/rollbar-gem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rollbar/rollbar-gem/labels{/name}","releases_url":"https://api.github.com/repos/rollbar/rollbar-gem/releases{/id}","created_at":"2012-08-26T01:00:16Z","updated_at":"2015-07-18T15:24:58Z","pushed_at":"2015-07-17T18:57:11Z","git_url":"git://github.com/rollbar/rollbar-gem.git","ssh_url":"git@github.com:rollbar/rollbar-gem.git","clone_url":"https://github.com/rollbar/rollbar-gem.git","svn_url":"https://github.com/rollbar/rollbar-gem","homepage":"https://rollbar.com/docs/","size":3719,"stargazers_count":92,"watchers_count":92,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":32,"forks":87,"open_issues":32,"watchers":92,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/261"},"html":{"href":"https://github.com/rollbar/rollbar-gem/pull/261"},"issue":{"href":"https://api.github.com/repos/rollbar/rollbar-gem/issues/261"},"comments":{"href":"https://api.github.com/repos/rollbar/rollbar-gem/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/rollbar/rollbar-gem/statuses/415108d64e1254ec20ad2030c87e06b0a61f4a2d"}}}}