Project

General

Profile

Bug #12436

newline argument of File.open seems not respected on Windows

Added by Eregon (Benoit Daloze) about 4 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]
[ruby-core:75767]
Tags:

Description

File.open("abc", "wt", newline: :lf) { |f|
  f.write "a\n"
  f.puts "b"
}

will create a file with CRLF newlines, ignoring the newline conversion argument.
It should write only LF instead, like on other platforms when the newline conversion is specified.

No data to display

Also available in: Atom PDF