[ruby-core:105780] [Ruby master Bug#12436] newline argument of File.open seems not respected on Windows
From:
"mame (Yusuke Endoh)" <noreply@...>
Date:
2021-10-25 09:07:48 UTC
List:
ruby-core #105780
Issue #12436 has been updated by mame (Yusuke Endoh).
Assignee changed from usa (Usaku NAKAMURA) to nobu (Nobuyoshi Nakada)
Status changed from Open to Assigned
@matz accepted this and asked @nobu to review the PR.
----------------------------------------
Bug #12436: newline argument of File.open seems not respected on Windows
https://bugs.ruby-lang.org/issues/12436#change-94294
* Author: Eregon (Benoit Daloze)
* Status: Assigned
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* ruby -v: ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
~~~ruby
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.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>