[s3-dev] Don't overwrite XmlSimple#xml_in

Jeffrey Hardy packagethief at gmail.com
Sun Jun 22 22:06:28 EDT 2008

I've forked aws/s3 on github and removed the bundled FasterXmlSimple's  
unfortunate overwriting of XmlSimple#xml_in.

The reason FasterXmlSimple's overwriting is unfortunate is that its  
version isn't 100% compatible:

$ irb -rubygems
 >> require 'xmlsimple'
 >> xml = '<response success="true"><items></items></response>'
 >> XmlSimple.xml_in(xml)
=> {"items"=>[{}], "success"=>"true"}
 >> require 'aws/s3'
 >> XmlSimple.xml_in(xml)
=> {"response"=>{"items"=>{}, "success"=>"true"}}

This can cause a lot of head scratching when you're using XmlSimple  
and wondering why it's not working like you'd expect. We probably  
shouldn't be in the practice of changing another library unexpectedly,  
especially if we don't need to.

Since we're bundling the library and not relying on gems to load it,  
modifying it in place seems appropriate.

Feel free to pull these changes if anyone agrees.



More information about the amazon-s3-dev mailing list