Re: [libxml-devel] fyi: bug in libxml backend for Rails new xml_mini backend

2009-03-16 Thread Charlie Savage
And on the second test case: The error is here: def children_array_to_hash(hash={}) hash[child.name] = map do |child| returning({}) { |sub_hash| child.children_to_hash(sub_hash) } end hash end There is no check to see if the element name has chan

Re: [libxml-devel] fyi: bug in libxml backend for Rails new xml_mini backend

2009-03-16 Thread Charlie Savage
On the first test, its a bug in the activesupport code: def to_hash(hash={}) if text? raise LibXML::XML::Error if content.length >= LIB_XML_LIMIT hash[CONTENT_ROOT] = content # ! INCORRECT ! else This is the xml: good hello everyone morning

Re: [libxml-devel] fyi: bug in libxml backend for Rails new xml_mini backend

2009-03-16 Thread Stephen Bannasch
At 3:11 PM -0600 3/16/09, Charlie Savage wrote: Stephen, And where is the Hash#to_xml method defined? It's part of what an activesupport xml_mini backend does. Take a look in the rails source code here: activesupport/lib/active_support/xml_mini Which you can see here: http://github.com/r

Re: [libxml-devel] fyi: bug in libxml backend for Rails new xml_mini backend

2009-03-16 Thread Charlie Savage
Stephen, And where is the Hash#to_xml method defined? Charlie Stephen Bannasch wrote: FYI: I've got a bug in a Rails lighthouse ticket http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2258-libxml-xml_mini-backend-producing-incorrect-hashes Showing a case where the libxm