From: Jon Garvin Date: 2006-11-30T02:12:43+09:00 Subject: Re: Need a range, but not getting it. . . . 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'. Peter Bailey wrote: > Hello, > I'm going nuts with the simplest stuff here. I just want to take in > array data and make it into a range. > > Here's my test script, called test1.rb: > files = [ARGV] > files.to_s.gsub!(/\-/, "..") > puts files > > > Here's my attempt, with an argument: > test1.rb im123000-im123006 > > I get: > im123000-im123006 > > I want: > im123000..im123006 > > Thanks, > Peter > >