From: Xavier Noria Date: 2012-10-02T02:16:21+09:00 Subject: Re: \r\n for EOL in windows? Only in disk. When you work in text mode the I/O layer transforms from native to \n back and forth transparently. Regarding $, as your tests suggest, it only matches (an optional) \n. Google "Understanding Newlines", it is an article in ONLamp that has examples in Perl, but it applies to Ruby. Sent from my iPhone On 01/10/2012, at 18:58, Roger Pack wrote: > I believe "\r\n" is a normal newline for windows "type" files. > > Should the following work, then, seeing as $ is supposed to mean "end of > line"? > > >>> "abc\r\n" =~ /abc$/ > => nil > > This works: > >>> "abc\n" =~ /abc$/ > => 0 > > I'm guessing it shouldn't, actually, and current behavior is expected. > Thanks! > -roger- > > -- > Posted via http://www.ruby-forum.com/. >