From: Ned Konz Date: 2001-11-21T04:16:22+09:00 Subject: [ruby-talk:25938] Re: Why the appended '\n' in IO.readlines On Tuesday 20 November 2001 08:41 am, Jim Freeze wrote: > > >>>>> "J" == Jim Freeze writes: > > > > J> When reading it with IO.readlines, a newline is appended. > > > > Are you sure that this is ruby which has added the newline ? > > You are right. I never noticed that vi put a newline in the > file, even if I put only a single character in. Yuck, I thought > vi wouldn't to that! It doesn't unless you let it; you'd have to write it back out again to get it to do that (it will warn you with a [noeol] message when you edit it). To avoid doing this, start vim with the -b (binary) flag. -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://bike-nomad.com