rackspace/ruby-cloudfiles — pull request #88 by steveh (2012-11-12 00:09:58+00:00)
Title: Dup new_name in StorageObject#copy to prevent frozen String modification

`cloudfiles-1.5.0.1/lib/cloudfiles/storage_object.rb:374:in sub!: can't modify frozen String (RuntimeError)`

`Container#objects_detail` returns a `Hash` where the `:name` attribute is a `frozen` `String`

That means this code will fail:

container.objects_detail.each do |cf_obj_hash|
cf_obj = container.object(cf_obj_hash[:name])
cf_obj.copy(:container => "anothercontainer")
end

Because `StorageObject#copy` tries to modify the `name` in place