{"action":"created","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/3736","repository_url":"https://api.github.com/repos/jruby/jruby","labels_url":"https://api.github.com/repos/jruby/jruby/issues/3736/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/3736/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/3736/events","html_url":"https://github.com/jruby/jruby/issues/3736","id":141102476,"number":3736,"title":"File.open ignores :universal_newline options on Windows","user":{"login":"enebo","id":19819,"avatar_url":"https://avatars.githubusercontent.com/u/19819?v=3","gravatar_id":"","url":"https://api.github.com/users/enebo","html_url":"https://github.com/enebo","followers_url":"https://api.github.com/users/enebo/followers","following_url":"https://api.github.com/users/enebo/following{/other_user}","gists_url":"https://api.github.com/users/enebo/gists{/gist_id}","starred_url":"https://api.github.com/users/enebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enebo/subscriptions","organizations_url":"https://api.github.com/users/enebo/orgs","repos_url":"https://api.github.com/users/enebo/repos","events_url":"https://api.github.com/users/enebo/events{/privacy}","received_events_url":"https://api.github.com/users/enebo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jruby/jruby/labels/windows","name":"windows","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jruby/jruby/milestones/48","html_url":"https://github.com/jruby/jruby/milestones/JRuby%201.7.25","labels_url":"https://api.github.com/repos/jruby/jruby/milestones/48/labels","id":1427640,"number":48,"title":"JRuby 1.7.25","description":"","creator":{"login":"enebo","id":19819,"avatar_url":"https://avatars.githubusercontent.com/u/19819?v=3","gravatar_id":"","url":"https://api.github.com/users/enebo","html_url":"https://github.com/enebo","followers_url":"https://api.github.com/users/enebo/followers","following_url":"https://api.github.com/users/enebo/following{/other_user}","gists_url":"https://api.github.com/users/enebo/gists{/gist_id}","starred_url":"https://api.github.com/users/enebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enebo/subscriptions","organizations_url":"https://api.github.com/users/enebo/orgs","repos_url":"https://api.github.com/users/enebo/repos","events_url":"https://api.github.com/users/enebo/events{/privacy}","received_events_url":"https://api.github.com/users/enebo/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":4,"state":"open","created_at":"2015-11-24T16:55:20Z","updated_at":"2016-03-15T21:24:19Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-03-15T21:24:15Z","updated_at":"2016-03-15T22:45:48Z","closed_at":null,"body":"<!--\r\nThis is a simple template for filing JRuby isuses.\r\n\r\nPlease help us help you by providing the information below.\r\n\r\nText inside XML comment tags will not be shown in your report.\r\n-->\r\n\r\n### Environment\r\n\r\nboth jruby 1.7.24 and JRuby 9.0.5.0 have this issue.\r\n\r\n<!--\r\nProvide at least:\r\n* JRuby version (`jruby -v`) and command line (flags, JRUBY_OPTS, etc)\r\n* Operating system and platform (e.g. `uname -a`)\r\n\r\nOther relevant info you may wish to add:\r\n* Installed or activated gems\r\n* Application/framework version (e.g. Rails, Sinatra)\r\n* Environment variables\r\n-->\r\n\r\n### Expected Behavior\r\n\r\nA file which contains \\r\\n should still retain the \\r\\n and not convert to \\n if universal_newline is false.\r\n\r\n```ruby\r\nrequire 'csv'\r\nrequire \"tempfile\"\r\n\r\n@tempfile = Tempfile.new(%w\"temp .csv\")\r\n@tempfile.close\r\n@path = @tempfile.path\r\n\r\nFile.open(@path, \"wb\") do |file|\r\n  file << \"1\\t2\\t3\\r\\n\"\r\n  file << \"4\\t5\\r\\n\"\r\nend\r\n\r\nf = File.open(@path, {:universal_newline=>false})\r\np f.gets\r\n```\r\n<!--\r\nDescribe your expectation of how JRuby should behave.\r\nProvide an executable Ruby script or a link to an example repository.\r\n-->\r\n\r\n### Actual Behavior\r\n\r\nWe seem to always return \\n as delimiter.\r\n\r\n<!--\r\nDescribe or show the actual behavior.\r\nProvide text or screen capture showing the behavior.\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/jruby/jruby/issues/comments/197057093","html_url":"https://github.com/jruby/jruby/issues/3736#issuecomment-197057093","issue_url":"https://api.github.com/repos/jruby/jruby/issues/3736","id":197057093,"user":{"login":"headius","id":10135,"avatar_url":"https://avatars.githubusercontent.com/u/10135?v=3","gravatar_id":"","url":"https://api.github.com/users/headius","html_url":"https://github.com/headius","followers_url":"https://api.github.com/users/headius/followers","following_url":"https://api.github.com/users/headius/following{/other_user}","gists_url":"https://api.github.com/users/headius/gists{/gist_id}","starred_url":"https://api.github.com/users/headius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/headius/subscriptions","organizations_url":"https://api.github.com/users/headius/orgs","repos_url":"https://api.github.com/users/headius/repos","events_url":"https://api.github.com/users/headius/events{/privacy}","received_events_url":"https://api.github.com/users/headius/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T22:45:48Z","updated_at":"2016-03-15T22:45:48Z","body":"Weird."}}