Yukihiro Matsumoto
2/17/2009 1:17:00 AM
Hi,
In message "Re: invalid byte sequence in US-ASCII (ArgumentError)"
on Mon, 16 Feb 2009 09:15:54 +0900, Luther <lutheroto@gmail.com> writes:
|I'm having some trouble migrating from 1.8 to 1.9.1. I have this line of
|code:
|
|text.gsub! "\C-m", ''
|
|...which generates this error:
|
|/home/luther/bin/dos2gnu:16:in `gsub!': invalid byte sequence in
|US-ASCII (ArgumentError)
|
|The purpose is to strip out any ^M characters from the string.
I feel some smell of a bug. Could you show me the whole code and
reproducing input please?
matz.