rackspace/ruby-cloudfiles — pull request #77 by cthulhuology (2012-04-30 20:29:24+00:00)
Title: Fixed ordering issue where headers were being passed as http_conn in delete_object

...aders, but not http_conn, we are passing an empty object as the http_conn and not nil as intended. As a result a SwiftClient instance calling delete_object crashes:

TypeError: can't clone NilClass
from /home/dgoehrig/.rvm/gems/ruby-1.9.3-p125/gems/cloudfiles-1.5.0.1/lib/client.rb:599:in `clone'
from /home/dgoehrig/.rvm/gems/ruby-1.9.3-p125/gems/cloudfiles-1.5.0.1/lib/client.rb:599:in `delete_object'
from /home/dgoehrig/.rvm/gems/ruby-1.9.3-p125/gems/cloudfiles-1.5.0.1/lib/client.rb:118:in `call'
from /home/dgoehrig/.rvm/gems/ruby-1.9.3-p125/gems/cloudfiles-1.5.0.1/lib/client.rb:118:in `_retry'
from /home/dgoehrig/.rvm/gems/ruby-1.9.3-p125/gems/cloudfiles-1.5.0.1/lib/client.rb:616:in `delete_object'

Swapping the order means that _retry at line 118 calls with (url,token,container,name,HEADERS,http_conn,...) fixing the ordering issue