Peter Bailey wrote:

/ ...

> I ran it again, too, and, I still get the "can't modify frozen string
> (TypeError)" error.

Well, rather than try to sort this out, why not make a copy of the string
and solve it that way?

Rather than:

f.gsub!(/-/, "..")

Do this:

f = f.gsub(/-/, "..")

BTW there is no purpose to this copy:

>>>    files = ARGV
>>>    files.each do |f|

Just do:

ARGV.each do |f|

-- 
Paul Lutus
http://www.arachnoid.com