"Martin DeMello" <martindemello / yahoo.com> schrieb im Newsbeitrag news:%cTZc.292866$M95.74360 / pd7tw1no... > Robert Klemme <bob.news / gmx.net> wrote: > > > > "Martin DeMello" <martindemello / yahoo.com> schrieb im Newsbeitrag > > news:idIZc.301315$J06.4478 / pd7tw2no... > > > Any way to make IO.readlines chomp each line before adding it to the > > > array? (i.e. a = IO.readlines.map {|i| i.chomp} but done in the > > > readlines call itself) > > > > Not AFAIK. You can do > > [...] > > Ah - I was hoping there was some sort of $variable that controlled > chomping. If at all a method argument acting as flag would be appropriate ($global == EVIL). I guess it was omitted because #readlines has already an optional parameter (the line terminator). Kind regards robert