From: Stefano Crocco Date: 2006-12-01T04:24:44+09:00 Subject: Re: Need a range, but not getting it. . . . Alle 19:04, gioved狸 30 novembre 2006, Peter Bailey ha scritto: > > Why use gsub! at all? > > > > ARGV.each do |f| > > puts f.gsub(/-/, "..") > > end > > Thanks. Yeh, I can do a "puts," but, I can't just change the silly hypen > to 2 range dots. I get the frozen string error. The point is to use puts, it is to use gsub instead of gsub!, which I see you used in a previous post. gsub! modifies the string it is called on, which you can't do with strings in ARGV, since they're frozen. gsub, instead, creates a new string, so it shouldn't complain about frozen string.