{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/22696453","id":22696453,"diff_hunk":"@@ -939,7 +939,15 @@ def quietly\n \n   def silence_stream(stream)\n     old_stream = stream.dup\n-    stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')\n+    null = case\n+           when IO.const_defined?(:NULL)","path":"activerecord/test/cases/migration_test.rb","position":6,"original_position":6,"commit_id":"7c1b9385533a0ae3c88c285f14b400c46ad7d343","original_commit_id":"7c1b9385533a0ae3c88c285f14b400c46ad7d343","user":{"login":"egilburg","id":242532,"avatar_url":"https://avatars.githubusercontent.com/u/242532?v=3","gravatar_id":"","url":"https://api.github.com/users/egilburg","html_url":"https://github.com/egilburg","followers_url":"https://api.github.com/users/egilburg/followers","following_url":"https://api.github.com/users/egilburg/following{/other_user}","gists_url":"https://api.github.com/users/egilburg/gists{/gist_id}","starred_url":"https://api.github.com/users/egilburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egilburg/subscriptions","organizations_url":"https://api.github.com/users/egilburg/orgs","repos_url":"https://api.github.com/users/egilburg/repos","events_url":"https://api.github.com/users/egilburg/events{/privacy}","received_events_url":"https://api.github.com/users/egilburg/received_events","type":"User","site_admin":false},"body":"1.9.2 hasn't been supported by Rails for a long time. Even for existing 4.2 build, 1.9.3 is minimum.\r\n\r\nAs for Rails 5.0, it'll have minimum version of either 2.2 or 2.1.\r\n\r\nSo I think you could just always use IO:NULL and remove the other conditions","created_at":"2015-01-09T01:13:31Z","updated_at":"2015-01-09T01:13:31Z","html_url":"https://github.com/rails/rails/pull/18381#discussion_r22696453","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/18381","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/22696453"},"html":{"href":"https://github.com/rails/rails/pull/18381#discussion_r22696453"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/18381"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/18381","id":26940387,"html_url":"https://github.com/rails/rails/pull/18381","diff_url":"https://github.com/rails/rails/pull/18381.diff","patch_url":"https://github.com/rails/rails/pull/18381.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/18381","number":18381,"state":"open","locked":false,"title":"Prefer IO::NULL over hardcoded device name","user":{"login":"nobu","id":16700,"avatar_url":"https://avatars.githubusercontent.com/u/16700?v=3","gravatar_id":"","url":"https://api.github.com/users/nobu","html_url":"https://github.com/nobu","followers_url":"https://api.github.com/users/nobu/followers","following_url":"https://api.github.com/users/nobu/following{/other_user}","gists_url":"https://api.github.com/users/nobu/gists{/gist_id}","starred_url":"https://api.github.com/users/nobu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nobu/subscriptions","organizations_url":"https://api.github.com/users/nobu/orgs","repos_url":"https://api.github.com/users/nobu/repos","events_url":"https://api.github.com/users/nobu/events{/privacy}","received_events_url":"https://api.github.com/users/nobu/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-07T06:35:20Z","updated_at":"2015-01-09T01:13:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c89408a78833fdd1add41ae8a71b55050a83ef16","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/18381/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/18381/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rails/rails/issues/18381/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/7c1b9385533a0ae3c88c285f14b400c46ad7d343","head":{"label":"nobu:Prefer-IO_NULL","ref":"Prefer-IO_NULL","sha":"7c1b9385533a0ae3c88c285f14b400c46ad7d343","user":{"login":"nobu","id":16700,"avatar_url":"https://avatars.githubusercontent.com/u/16700?v=3","gravatar_id":"","url":"https://api.github.com/users/nobu","html_url":"https://github.com/nobu","followers_url":"https://api.github.com/users/nobu/followers","following_url":"https://api.github.com/users/nobu/following{/other_user}","gists_url":"https://api.github.com/users/nobu/gists{/gist_id}","starred_url":"https://api.github.com/users/nobu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nobu/subscriptions","organizations_url":"https://api.github.com/users/nobu/orgs","repos_url":"https://api.github.com/users/nobu/repos","events_url":"https://api.github.com/users/nobu/events{/privacy}","received_events_url":"https://api.github.com/users/nobu/received_events","type":"User","site_admin":false},"repo":{"id":28898988,"name":"rails","full_name":"nobu/rails","owner":{"login":"nobu","id":16700,"avatar_url":"https://avatars.githubusercontent.com/u/16700?v=3","gravatar_id":"","url":"https://api.github.com/users/nobu","html_url":"https://github.com/nobu","followers_url":"https://api.github.com/users/nobu/followers","following_url":"https://api.github.com/users/nobu/following{/other_user}","gists_url":"https://api.github.com/users/nobu/gists{/gist_id}","starred_url":"https://api.github.com/users/nobu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nobu/subscriptions","organizations_url":"https://api.github.com/users/nobu/orgs","repos_url":"https://api.github.com/users/nobu/repos","events_url":"https://api.github.com/users/nobu/events{/privacy}","received_events_url":"https://api.github.com/users/nobu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nobu/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/nobu/rails","forks_url":"https://api.github.com/repos/nobu/rails/forks","keys_url":"https://api.github.com/repos/nobu/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nobu/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nobu/rails/teams","hooks_url":"https://api.github.com/repos/nobu/rails/hooks","issue_events_url":"https://api.github.com/repos/nobu/rails/issues/events{/number}","events_url":"https://api.github.com/repos/nobu/rails/events","assignees_url":"https://api.github.com/repos/nobu/rails/assignees{/user}","branches_url":"https://api.github.com/repos/nobu/rails/branches{/branch}","tags_url":"https://api.github.com/repos/nobu/rails/tags","blobs_url":"https://api.github.com/repos/nobu/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nobu/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nobu/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/nobu/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nobu/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/nobu/rails/languages","stargazers_url":"https://api.github.com/repos/nobu/rails/stargazers","contributors_url":"https://api.github.com/repos/nobu/rails/contributors","subscribers_url":"https://api.github.com/repos/nobu/rails/subscribers","subscription_url":"https://api.github.com/repos/nobu/rails/subscription","commits_url":"https://api.github.com/repos/nobu/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/nobu/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/nobu/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/nobu/rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/nobu/rails/contents/{+path}","compare_url":"https://api.github.com/repos/nobu/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nobu/rails/merges","archive_url":"https://api.github.com/repos/nobu/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nobu/rails/downloads","issues_url":"https://api.github.com/repos/nobu/rails/issues{/number}","pulls_url":"https://api.github.com/repos/nobu/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/nobu/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/nobu/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nobu/rails/labels{/name}","releases_url":"https://api.github.com/repos/nobu/rails/releases{/id}","created_at":"2015-01-07T04:55:50Z","updated_at":"2015-01-07T05:54:05Z","pushed_at":"2015-01-07T06:30:40Z","git_url":"git://github.com/nobu/rails.git","ssh_url":"git@github.com:nobu/rails.git","clone_url":"https://github.com/nobu/rails.git","svn_url":"https://github.com/nobu/rails","homepage":"http://rubyonrails.org","size":125972,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"5d28c6b5b8407abf9274f78502d387c98f209286","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-01-08T20:55:28Z","pushed_at":"2015-01-08T20:55:28Z","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":374080,"stargazers_count":24536,"watchers_count":24536,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9459,"mirror_url":null,"open_issues_count":732,"forks":9459,"open_issues":732,"watchers":24536,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/18381"},"html":{"href":"https://github.com/rails/rails/pull/18381"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/18381"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/18381/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/18381/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/18381/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/7c1b9385533a0ae3c88c285f14b400c46ad7d343"}}}}