Nobuyoshi Nakada wrote:
> Hi,
> 
> At Sat, 14 Oct 2006 06:10:23 +0900,
> Snoopy Dog wrote in [ruby-talk:219613]:
>>    if File.file? path
>>       puts path + ' is a file'
>>       oldname = path
>         newname = path.sub('longfilename - 0', '0')
>>       puts  newname + ' Is the newfile'
>>       puts "\n\nCheck About to RENAME file"
>>       File.rename(oldname, newname)
>>       puts 'Renamed ' + oldname + ' to ' + newname + "\n\n\n"
>>     end
> 
> Assigning path to newpath doesn't create a new string, but
> makes the latter to share the same string with the former and
> oldname.

Just got back and tried this.

Same ERROR.

Any other ideas?  Did I miss something on the install?


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