From: Xavier Noria Date: 2012-10-31T08:25:52+09:00 Subject: newline conversion on reading? --f46d042dfea53b2b2104cd4f1b05 Content-Type: text/plain; charset=UTF-8 I can't get newline conversions to work while reading: File.write('foo.txt', "foo\r\nbar\r\n") File.open('foo.txt', 'r', universal_newline: true) {|fh| fh.read} # => "foo\r\nbar\r\n", no normalization performed Are they only supposed to work for writing? If yes, why the asymmetry? --f46d042dfea53b2b2104cd4f1b05 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I can't get newline conversions to work while reading:

=C2=A0 =C2=A0 File.write('foo.txt', "foo\r\nbar\r\= n")
=C2=A0 =C2=A0 File.open('foo.txt', 'r', = universal_newline: true) {|fh| fh.read}
=C2=A0 =C2=A0 # =3D>=C2=A0"foo\r\nbar\r\n", no normalizat= ion performed

Are they only supposed to work= for writing? If yes, why the asymmetry?

--f46d042dfea53b2b2104cd4f1b05--