Jon Garvin wrote:
> Try...
> 
> files = [ARGV].to_s
> files.gsub!(/\-/, "..")
> puts files
> 
> However, I *think* that ARGV is already a string? so that to_s in the 
> first line may be redundant.
> 
> Your problem was that, although gsub! (with the !) normally modifies the 
> receiver, 'files' wasn't the receiver (to_s was), so you weren't 
> actually changing 'files'.

Cool. That worked, Jon. Thanks. I don't quite understand it, though. I 
suppose you're right, that gsub was modifying to_s and not files, but, 
why was that? I thought that to_s was modifying files and then gsub was 
modifying that modified files. I guess I need to tame my dots, eh?

-- 
Posted via http://www.ruby-forum.com/.