From: "Ara.T.Howard" Date: 2004-01-30T12:44:57+09:00 Subject: Re: why won't ruby chomp for me? On Fri, 30 Jan 2004, Dion Mendel wrote: > Date: Fri, 30 Jan 2004 10:07:49 +0900 > From: Dion Mendel > Newsgroups: comp.lang.ruby > Subject: Re: why won't ruby chomp for me? > > On Fri, Jan 30, 2004 at 12:04:30AM +0900, Emmanuel Touzery wrote: > > > i find myself many times forgetting that chomp and the > > fact ruby offers me the "raw" line format never ever helped me in any > > way. is it just historical praise to Perl? > > I too find the chomp an ugly perlism. Has anyone written code that makes > use of the trailing line separator from IO#gets? > > Unless someone argues why it would not be a good idea, I will submit an RCR > for changing IO#gets to not include the trailing line separator by default. it might not be agood idea when lines are empty... but i suppose it would work. i would loath having to remember to open a file in binary mode in order for methods in IO to _not_ to automagical things to the data too... 2 cts. -a > > Dion. > > > -- ATTN: please update your address books with address below! =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328 | STP :: http://www.ngdc.noaa.gov/stp/ | NGDC :: http://www.ngdc.noaa.gov/ | NESDIS :: http://www.nesdis.noaa.gov/ | NOAA :: http://www.noaa.gov/ | US DOC :: http://www.commerce.gov/ | | The difference between art and science is that science is what we | understand well enough to explain to a computer. | Art is everything else. | -- Donald Knuth, "Discover" | | /bin/sh -c 'for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done' ===============================================================================