Hi,

At Sat, 19 Jan 2002 06:59:12 +0900,
Michael Hayes <mike / aiinc.ca> wrote:
> chomp won't remove the last char from an
> unterminated line, but it only works on one
> type of record separator, so it won't handle
> \n and \r\n at the same time.

1.7 works as you want.

$ ruby17 -v -e '["foo\r\n", "foo\r", "foo\n", "foo"].each {|s| p s.chomp}'
ruby 1.7.2 (2002-01-18) [i686-linux]
"foo"
"foo"
"foo"
"foo"

-- 
Nobu Nakada